0

I dont know whether it is possible to view tga image files on asp.net?

Tga image files are not known image files for webpages, I think.

But there might be a control to view tag image files for asp.net?

Thanks in advance.

olidev
  • 20,058
  • 51
  • 133
  • 197
  • Do you want ASP.NET to process the TGA images, or do you want ASP.NET to deliver TGA images to a browser to view? – Jon Adams Nov 25 '11 at 22:28
  • yes, I want to view TGA images on asp.net. – olidev Nov 26 '11 at 05:38
  • ASP.NET is a server-side only technology. You can't "view" an image on it. You can either deliver an image for viewing in a browser, or read it, process it, then deliver it to the browser. There's a difference between those two. Which are you after? – Jon Adams Nov 26 '11 at 06:37

1 Answers1

2

As you already know browsers do not support TGA images. One alternative might be plugins such as flash, silverlight, ... which I believe do support TGA images.

If plugins are not an option, you will need to convert the TGA image to a format browsers can handle, e.g. jpg. You could use an HttpHandler for this.

This article shows the use of httphandlers to generate thumbnails on the fly. You can use this same approach and use a library such as ImageMagick to do the conversion and return the image in jpg format on the fly. Here you find a codeproject article explaining how to use ImageMagick within an asp.net website.

santiagoIT
  • 9,411
  • 6
  • 46
  • 57