PC Review


Reply
Thread Tools Rate Thread

Display tiff images

 
 
a.mustaq@gmail.com
Guest
Posts: n/a
 
      5th Oct 2007
Hi All,

In my application, I have to display tiff images
stored on server. Please help me in acheaving this.

With Regards,
Mustaq Ahmed.A

 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      5th Oct 2007
On Oct 5, 9:01 am, "a.mus...@gmail.com" <a.mus...@gmail.com> wrote:
> Hi All,
>
> In my application, I have to display tiff images
> stored on server. Please help me in acheaving this.
>
> With Regards,
> Mustaq Ahmed.A


Here's a sample script that will work as showimage.aspx?
image=file.tiff, where file.tiff is a name of the file in the root

<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object sender, EventArgs e)
{
string imageLocation = Server.MapPath(Request.QueryString["image"]);
System.Drawing.Bitmap origBitmap = new
System.Drawing.Bitmap(imageLocation);
System.Drawing.Bitmap outputImage = new
System.Drawing.Bitmap(origBitmap);
System.Drawing.Imaging.ImageFormat outputFormat =
System.Drawing.Imaging.ImageFormat.Jpeg;
outputImage.Save(Response.OutputStream, outputFormat);
outputImage.Dispose();
origBitmap.Dispose();
}
</script>

as you can see it converts an image into Jpeg. Note, that the
System.Drawing.Bitmap object has a problem to load some TIF files.
Some work and some don't ("Parameter is not valid" error is thrown).
As I see it can be a problem of the format. For example, for files
with no compression, or in LZW it would work, and ZIP is not working.

Hope it helps

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I display linked TIFF images within Access 2003? Case Cybermancer Microsoft Access Forms 0 9th Mar 2006 01:48 PM
How do I display linked TIFF images within Access 2003? Case Cybermancer Microsoft Access Reports 0 9th Mar 2006 01:48 PM
Display multipage tiff images Lance Microsoft Access Forms 0 13th Jun 2005 08:00 AM
Display PDF and TIFF images in VB.NET =?Utf-8?B?QW5keSBBMzg=?= Microsoft VB .NET 1 28th Jan 2005 08:44 AM
IE6 Does Not Display TIFF Images Randy Windows XP Internet Explorer 2 19th Dec 2003 01:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:21 PM.