Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Images TIFF on .aspx Web forms

0 views
Skip to first unread message

Guillermo Jimenez

unread,
Oct 1, 2007, 2:13:01 PM10/1/07
to
Hi....

Please help me with this case. I need to show an image .TIFF in a .aspx web
page. The web site is developer on Visual Studio 2005. The image control no
support this image format, that control i can use to show this format???

Thanks.

David Wier

unread,
Oct 1, 2007, 2:48:56 PM10/1/07
to
I believe it's not recognizing it because most browsers don't support it.
My recommendation would be to convert to jpg or png format

--

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup


"Guillermo Jimenez" <Guillerm...@discussions.microsoft.com> wrote in
message news:97C2676D-1CB9-40B2...@microsoft.com...

sloan

unread,
Oct 1, 2007, 3:15:46 PM10/1/07
to
PS

http://www.bobpowell.net/faqmain.htm

Bob's site is daBomb for graphical related stuff.

Check it out for code options.


"sloan" <sl...@ipass.net> wrote in message
news:OPedG5FB...@TK2MSFTNGP04.phx.gbl...
>
> Ditto on the other post.
>
> Here are some options as I see them:
>
> 1. Force your users to install some thirdparty tool. (Not a good option,
> but an option).
> 2. Convert to gif or jpg. If you have a bitonal tiff, then use gif. If
> you have alot/lotta colors, use jpg.
> 3. Buy a third party tool like:
> http://www.atalasoft.com/ajaxviewer/
>
> #2 is your cheapest/least client dependacies. However, you have to pay
> the price each time you serve the file up.


>
>
>
>
> "Guillermo Jimenez" <Guillerm...@discussions.microsoft.com> wrote in
> message news:97C2676D-1CB9-40B2...@microsoft.com...

sloan

unread,
Oct 1, 2007, 3:07:01 PM10/1/07
to

Ditto on the other post.

Here are some options as I see them:

1. Force your users to install some thirdparty tool. (Not a good option,
but an option).
2. Convert to gif or jpg. If you have a bitonal tiff, then use gif. If
you have alot/lotta colors, use jpg.
3. Buy a third party tool like:
http://www.atalasoft.com/ajaxviewer/

#2 is your cheapest/least client dependacies. However, you have to pay the
price each time you serve the file up.


"Guillermo Jimenez" <Guillerm...@discussions.microsoft.com> wrote in
message news:97C2676D-1CB9-40B2...@microsoft.com...

Alexey Smirnov

unread,
Oct 1, 2007, 3:39:40 PM10/1/07
to
On Oct 1, 8:13 pm, Guillermo Jimenez

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

0 new messages