Ruben2776 / PicView

Fast, free and customizable image viewer for Windows 10 and 11.
https://picview.org
Other
995 stars 66 forks source link

Unable to render TGA image #22

Closed RaphCoder13 closed 2 years ago

RaphCoder13 commented 4 years ago

Describe the bug The application display "Unable to render image" when I drop a tga image on the interface. Before dropping, the preview is showned but is flipped vertically.

I noted that TGA extension is not present in the open file dialog

Additional context Tests were done with PIcView self-contained and Framework-dependent version 0.9.9.8 I tried with 32 and 8 bits uncompressed images.

Ruben2776 commented 4 years ago

Hi there, thanks for submitting your bug report.

I'll improve file support soon, as well as TGA and take a look at the issues.

Ruben2776 commented 3 years ago

With the release of PicView 1.0.5 support for .tga, .dds, .xcf has been added.

RaphCoder13 commented 3 years ago

Hello,

I made a quick test, the various tga files (8, 24, 32 bits, RLE or not) are loading.

However, some of them are rendered upside down, I guess the image origin location specified in the header is ignored.

The open file doesn't show the *.tga files but they are displayed in the gallery.

Here is a test image : Test.zip

Ruben2776 commented 3 years ago

Hello,

I've tested it with your file and replicated the issue, however I haven't come to a conclusion on how to fix it yet. I'm currently using https://github.com/nickbabcock/Pfim to decode .dds and .tga. Using ImagaMagick doesn't work for every .tga and it caused the same issue with the test file.

if anyone wants to help, the relevant code is located in https://github.com/Ruben2776/PicView/blob/master/PicView/ImageHandling/ImageDecoder.cs in the RenderToBitmapSource method.

The open file doesn't show the *.tga files but they are displayed in the gallery.

Sorry, forgot to add it to the open file dialog. I'll add it in the next release.

Ruben2776 commented 2 years ago

Kinda late, but better than never. Release 1.5.6 has resolved .tga files being shown upside-down.