Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tga to tiff gets rotatet #1406

Closed
arnoldjan opened this issue Dec 5, 2018 · 7 comments
Closed

tga to tiff gets rotatet #1406

arnoldjan opened this issue Dec 5, 2018 · 7 comments

Comments

@arnoldjan
Copy link

arnoldjan commented Dec 5, 2018

Description

When converting a tga to tiff the output gets rotated. It has a "Mirror vertical" orientation header.
It is working as expected for conversions to jpg and png.

Steps to Reproduce

Example file: https://static.online-convert.com/example-file/raster%20image/tga/example_small.tga

Command: convert example_small.tga out.tiff

System Configuration

  • ImageMagick version: 7.0.8-14 & 7.0.8-15
  • Environment (Operating system, version and so on): Ubuntu 18.04 & openSUSE 42.3 & Max OSX Sierra
@urban-warrior
Copy link
Member

The conversion appears to work with 7.0.8-16 Beta:

$ convert example_small.tga out.png
$ convert example_small.tga out.tiff
$ compare -metric rmse out.tiff   example_small.tga null:
0 (0)
$ compare -metric rmse out.tiff  out.png null:
0 (0)   

The orientation is reported as BottomLeft. Is this not the expected result?

@arnoldjan
Copy link
Author

Sorry for the delay.
I tried both with 7.0.8-16 and 7.0.8-17 and for both versions I can not open the resulting tiff.
Also when I try to convert the tiff the conversion fails.

@fmw42
Copy link

fmw42 commented Dec 19, 2018

In IM 7, use magick not convert. It works fine for me on IM 7.0.8.17 Q16 HDRI Mac OSX. I can open the tiff file in Mac Preview and in ImageMagick display. However, the PNG output is the correct orientation, but the TIFF output is rotated 180 deg.

@arnoldjan
Copy link
Author

Ok, retested with 7.0.8-18 and I can open the tiff but it still is rotated.

@Takawari
Copy link

I confirm this issue.

$ magick --version
Version: ImageMagick 7.0.8-18 Q16 x86_64 20181218 https://imagemagick.org
$ wget https://imagemagick.org/image/wizard.jpg
$ magick wizard.jpg wizard.tga (correct)
$ magick wizard.tga wizard.tiff (rotated)

@dlemstra
Copy link
Member

dlemstra commented Jan 7, 2019

I am also unable to reproduce your issue with the latest version of ImageMagick. Maybe this is a problem libtiff problem? I am using version 4.0.9.

@fmw42
Copy link

fmw42 commented Jan 7, 2019

Using IM 7.0.8.23 Q16 Mac OSX Sierra, I get the following:

$ convert example_small.tga out.png
$ convert example_small.tga out.tiff
$ compare -metric rmse out.tiff example_small.tga null:
0 (0)
$ compare -metric rmse out.tiff out.png null:
0 (0)

But the tiff version is viewed upside down by Mac Preview and Mac GraphicConverter and Photoshop. But IM display shows it properly oriented. This looks like some meta data issue and depends upon how various viewers display it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants