tga 16 bit

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
nilsca
Posts: 14
Joined: 2014-11-19T17:51:21-07:00
Authentication code: 6789

Re: tga 16 bit

Post by nilsca »

on the patch - what I actually did try out is trunk

URL: https://subversion.imagemagick.org/subv ... gick/trunk

which includes http://trac.imagemagick.org/changeset/17274.

I do get perfect results with the 6.9 branch change, just to make sure can you double check trunk once more (I've built the whole thing so I'm not sure what I'm messing up there :) ) ?


Thanks a lot
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: tga 16 bit

Post by dlemstra »

The trunk is working for me, not sure why it fails for you. Be aware that the trunk is IM7.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
nilsca
Posts: 14
Joined: 2014-11-19T17:51:21-07:00
Authentication code: 6789

Re: tga 16 bit

Post by nilsca »

hmm, I have trunk checked out

Code: Select all

nils ~/workspace/ImageMagick $ svn info
Path: .
Working Copy Root Path: /mnt/workspace/ImageMagick
URL: https://subversion.imagemagick.org/subversion/ImageMagick/trunk
Relative URL: ^/ImageMagick/trunk
Repository Root: https://subversion.imagemagick.org/subversion
Repository UUID: aa41f4f7-0bf4-0310-aa73-e5a19afd5a74
Revision: 17319
Node Kind: directory
Schedule: normal
Last Changed Author: dirk
Last Changed Rev: 17319
Last Changed Date: 2014-12-17 11:11:01 -0500 (Wed, 17 Dec 2014)

nils ~/workspace/ImageMagick $ svn update
Updating '.':
At revision 17319.

nils ~/workspace/ImageMagick $ utilities/magick -version
Version: ImageMagick 7.0.0-0 Q16 x86_64 2014-12-16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
Features: DPC HDRI OpenMP
Delegates (built-in): freetype jng jpeg png x xml zlib

nils ~/workspace/ImageMagick $ utilities/magick -depth 5 -compress none ~/Dropbox/Forum/original.png ~/Dropbox/Forum/original-trunk.tga
and 6.9.0 with the tga.c patched as per changeset

Code: Select all

nils ~/workspace/ImageMagick-6.9.0-0 $ utilities/convert -version
Version: ImageMagick 6.9.0-0 Q16 x86_64 2014-12-15 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates (built-in): freetype jng jpeg png x xml zlib

nils ~/workspace/ImageMagick-6.9.0-0 $ utilities/convert -depth 5 -compress none ~/Dropbox/Forum/original.png ~/Dropbox/Forum/original-690.tga
Files:

original.png https://www.dropbox.com/s/x9a0ojavlirwl ... l.png?dl=0
original-6.tga (works fine now) https://www.dropbox.com/s/2bvts8jgqcjbk ... 6.tga?dl=0
original-trunk.tga (trunk converted, shows garbled in windows preview&gimp) https://www.dropbox.com/s/ixb8audq88ysh ... k.tga?dl=0

Are my options different that what you're running on trunk?

Thanks
Nils
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: tga 16 bit

Post by dlemstra »

You should specify the -depth 5 and -compress none after you read the input image but that does not explain the problem. I executed the following commands:

x64 (to check if this is a x64/x86 issue)

Code: Select all

D:\ImageMagick\ImageMagick-Windows-7-x64\VisualMagick\bin>svn info ..\..\coders
Path: D:\ImageMagick\ImageMagick-Windows-7-x64\coders
Working Copy Root Path: D:\ImageMagick\ImageMagick-Windows-7-x64\coders
URL: https://subversion.imagemagick.org/subversion/ImageMagick/trunk/coders
Relative URL: ^/ImageMagick/trunk/coders
Repository Root: https://subversion.imagemagick.org/subversion
Repository UUID: aa41f4f7-0bf4-0310-aa73-e5a19afd5a74
Revision: 17323
Node Kind: directory
Schedule: normal
Last Changed Author: cristy
Last Changed Rev: 17323
Last Changed Date: 2014-12-18 01:51:37 +0100 (do, 18 dec 2014)

D:\ImageMagick\ImageMagick-Windows-7-x64\VisualMagick\bin>magick --version
Version: ImageMagick 7.0.0-0 Q16 x64 2014-12-15 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
Features: DPC Modules HDRI OpenMP
Delegates (built-in): bzlib cairo freetype jbig jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib

D:\ImageMagick\ImageMagick-Windows-7-x64\VisualMagick\bin>magick d:\original.png -depth 5 -compress none d:\original-trunk.x64.tga

D:\ImageMagick\ImageMagick-Windows-7-x64\VisualMagick\bin>magick d:\original-trunk.x64.tga d:\original-trunk.x64.png
And x86

Code: Select all

D:\ImageMagick\ImageMagick-Windows-7\VisualMagick\bin>svn info ..\..\coders
Path: D:\ImageMagick\ImageMagick-Windows-7\coders
Working Copy Root Path: D:\ImageMagick\ImageMagick-Windows-7\coders
URL: https://subversion.imagemagick.org/subversion/ImageMagick/trunk/coders
Relative URL: ^/ImageMagick/trunk/coders
Repository Root: https://subversion.imagemagick.org/subversion
Repository UUID: aa41f4f7-0bf4-0310-aa73-e5a19afd5a74
Revision: 17313
Node Kind: directory
Schedule: normal
Last Changed Author: dirk
Last Changed Rev: 17311
Last Changed Date: 2014-12-17 08:32:49 +0100 (wo, 17 dec 2014)

D:\ImageMagick\ImageMagick-Windows-7\VisualMagick\bin>magick --version
Version: ImageMagick 7.0.0-0 Q16 x86 2014-12-15 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
Features: DPC Modules HDRI OpenMP
Delegates (built-in): bzlib cairo freetype jbig jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib

D:\ImageMagick\ImageMagick-Windows-7\VisualMagick\bin>magick d:\original.png -depth 5 -compress none d:\original-trunk.x86.tga

D:\ImageMagick\ImageMagick-Windows-7\VisualMagick\bin>magick d:\original-trunk.x86.tga d:\original-trunk.x86.png
I am getting the following files: https://www.dropbox.com/sh/vf9oi99mn0g3 ... LL-pa?dl=0 and this looks correct to me. Can you try running a make clean and rebuild IM7 again?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
nilsca
Posts: 14
Joined: 2014-11-19T17:51:21-07:00
Authentication code: 6789

Re: tga 16 bit

Post by nilsca »

You should specify the -depth 5 and -compress none after you read the input image but that does not explain the problem
Ahh, that's the problem - with the depth parameter before the source (albeit user error) I get no problem in 6.9

Code: Select all

utilities/convert -depth 5 ~/Dropbox/Forum/original.png ~/Dropbox/Forum/converted.tga
in 7 as per latest svn state I get a bad image (as per windows preview/gimp)

Code: Select all

utilities/magick -depth 5 ~/Dropbox/Forum/original.png ~/Dropbox/Forum/original-bad.tga
utilities/identify ~/Dropbox/Forum/original-bad.tga
/home/nils/Dropbox/Forum/original-bad.tga TGA 96x96 96x96+0+0 5-bit sRGB 36.9KB 0.000u 0:00.000
I'm building on Linux right now since I don't have Visual C++ setup - it seems though that the handling of this parameter before source is triggering some other behavior. Not a big deal but weird :)

I'm good now I think, thanks a lot for your attention.
Nils

p.s. when does 6.9.0-1 come out? :) (I don't think there are windows binaries under http://imagemagick.org/download/beta)
Post Reply