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

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

Comments

Projects
None yet
5 participants
@arnoldjan
Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Dec 9, 2018

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

This comment has been minimized.

Copy link
Author

commented Dec 19, 2018

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Author

commented Dec 20, 2018

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

@Takawari

This comment has been minimized.

Copy link

commented Dec 21, 2018

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link

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
You can’t perform that action at this time.