convert translates upside down some picture when converting from jpg to tga
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
imagemagick (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When I convert some jpg image to tga format, the tga image is upside down.
The bug only appears with some jpg images, not all. I can convert thousands of jpg images without problems but in some rare images the bug occurs.
You can find three jpg images that are known to fail there:
https:/
I also attach to this bug report the smallest sample I have.
If I convert from jpg to png, the png is ok
If I convert from jpg to png then from png to tga, the tga is ok
If I convert from jpg to tga, the tga is upside down
You can reproduce by downloading the samples, then run this code in the directory containing the samples:
for i in *.jpg
do
n="$(basename "${i}" '.jpg')"
convert "${i}" "${n}.png"
convert "${i}" "${n}.tga"
done
You can have a look of the result there:
https:/
You can also download this script there:
https:/
ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: imagemagick-6.q16 8:6.9.10.
ProcVersionSign
Uname: Linux 5.0.0-21-generic x86_64
ApportVersion: 2.20.10-0ubuntu27.1
Architecture: amd64
CurrentDesktop: GNOME
Date: Sun Aug 4 01:59:00 2019
SourcePackage: imagemagick
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
mtime.conffile.
Bad news, sometime the converted png from jpg displays properly but is then set upside-down when converting from png to tga.
I updated the screenshot of the bug: /dl.illwieckz. net/b/imagemagi ck/bugs/ convert- jpg-to- tga-upside- down/convert- jpg-to- tga-upside- down.png
https:/
And the script to reproduce: /dl.illwieckz. net/b/imagemagi ck/bugs/ convert- jpg-to- tga-upside- down/convert- jpg-to- tga-upside- down.sh
https:/
Which now looks like this:
for i in *.jpg
do
n="$(basename "${i}" '.jpg')"
convert "${i}" "${n}.png"
convert "${i}" "${n}.tga"
convert "${n}.png" "${n}.png.tga"
done
When I said converting from jpg to png to tga worked, in fact I had only tested with one file. It's not always true. With the provided "noships.jpg" file, the bug is carried over the png.