Possible bug: partial clipping-path on jpg & tiff

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
techne

Possible bug: partial clipping-path on jpg & tiff

Post by techne »

hi,
i have a problem with some images (like this one: http://dl.dropbox.com/u/4951080/funghi.jpg)
it seems that IM can't use all the clipping-path.
I used (for example) this command:
convert funghi.jpg +clip-path "Tracciato 1" -negate funghi_clip.jpg

this is the result: http://dl.dropbox.com/u/4951080/funghi_clip_negate.jpg
it seems that a part of clipping-path is ignored.

I tried with lots of versions with the same result.

Thanks
AxelF1983

Re: Possible bug: partial clipping-path on jpg & tiff

Post by AxelF1983 »

I have the same problem. My image file has a clip path. But IM dont use the whole path. I have a image with a pot. When i use -clip. all around the cup is transparent but not the inside of the pot handle. But i have a clip path in the pot handle and around the pot. The problem looks like the images from "techne".

Any news or any idea to solve the problem? Is there another way for a work around?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Possible bug: partial clipping-path on jpg & tiff

Post by anthony »

Sounds like only one of multiple clipping paths are being applied. Note that a single clipping path could also have been used to specify the hole. WIthout more information I can't tell you more.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
AxelF1983

Re: Possible bug: partial clipping-path on jpg & tiff

Post by AxelF1983 »

I upload the EPS-File that you can have a look. You can download the EPS on:
http://www.fileuploadx.de/489320
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Possible bug: partial clipping-path on jpg & tiff

Post by Drarakel »

Both images in that thread work fine for me (IM v6.6.3-0). What versions are you using? @AxelF1983
(Hmm.. I thought that I had a problem, too, when testing the funghi.jpg back then. Maybe my memory tricks me - or the problem was solved since then.)

I used the commandline:

Code: Select all

convert -density 300 069415A1.eps -profile USWebCoatedSWOP.icc -profile sRGB.icm -alpha transparent -clip -alpha opaque test.png
(I think that your EPS has a real alpha channel, too. But it's a bit more trickier to use that - and wouldn't make much of a difference in that example.)
AxelF1983

Re: Possible bug: partial clipping-path on jpg & tiff

Post by AxelF1983 »

Thanks for fast reply. I use ImageMagick 6.6.1-3 2010-04-22 Q16 and your command dont work. the pot handle is still not free. is there a huge difference between the IM version?
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Possible bug: partial clipping-path on jpg & tiff

Post by Drarakel »

Well, my testing command was for use with color profiles - but even without profiles, it should still work.
You could try something like that again:
convert -density 300 069415A1.eps -colorspace RGB -alpha transparent -clip -alpha opaque -depth 8 test.png
And if that doesn't work, then you probably should update ImageMagick.

I'm getting:
when I'm using the clipping path: http://img3.imagebanana.com/img/d7apw8t ... 1_clip.png
when I'm using the alpha from the EPS (just for comparison): http://img3.imagebanana.com/img/b9lz9tk ... _alpha.png
AxelF1983

Re: Possible bug: partial clipping-path on jpg & tiff

Post by AxelF1983 »

Thanks for your reply.

Now i have updated my version to IM v6.6.3-0. But it still dont run!

On my local windows computer it runs with the version.

But on the (unix) server it doesnt run. the inside of the pot handle is still not transparent.

Any idea? Thanks forward!
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Possible bug: partial clipping-path on jpg & tiff

Post by Drarakel »

Wait a minute.. Now there are two systems?
You are getting the desired result (that one, right?) on your Windows PC, but not on the Unix server - is that correct?
If yes, then please tell the exact versions (with 'convert -version') that are running on your Windows PC and on the Unix server. And tell the exact commandlines that you used there.
AxelF1983

Re: Possible bug: partial clipping-path on jpg & tiff

Post by AxelF1983 »

It works right on the windows system with your command (pod handle is transparent):

Code: Select all

convert -density 300 069415A1.eps -colorspace RGB -alpha transparent -clip -alpha opaque -depth 8 test.png
Version: ImageMagick 6.6.3-0 2010-07-21 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
Ghostscript 8.71

But it doesnt work on the unix server with the same command (pod handle isnt transparent). But versions are the same:
Version: ImageMagick 6.6.3-0 2010-07-21 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
GPL Ghostscript 8.71 (2010-02-10)

I use the same images, same versions, same commands... But on the server the handle isnt transparent.

Hope you have an idea. :)
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Possible bug: partial clipping-path on jpg & tiff

Post by Drarakel »

Did you compile the versions from source? Maybe there are some delegates/libraries missing or different?

Let's try to narrow it down a bit. Take that JPG (clipping path is included) - and the following command:
http://j.imagehost.org/0787/069415A1.jpg

Code: Select all

convert 069415A1.jpg -clip -negate test.jpg
My result is this:
http://i.imagehost.org/0873/test_10.jpg
What's the result on your Unix server?
AxelF1983

Re: Possible bug: partial clipping-path on jpg & tiff

Post by AxelF1983 »

My result with your file and your command on the unix server is this:

http://a.imagehost.org/0266/test.jpg

No transparent pod handle.
AxelF1983

Re: Possible bug: partial clipping-path on jpg & tiff

Post by AxelF1983 »

Can you send my your configure.xml and the output from command?

Code: Select all

identify -list configure
This are my output files:

My configure.xml:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuremap [
<!ELEMENT configuremap (configure)+>
<!ELEMENT configure (#PCDATA)>
<!ATTLIST configure name CDATA #REQUIRED>
<!ATTLIST configure value CDATA #REQUIRED>
]>
<configuremap>
  <configure name="NAME" value="ImageMagick"/>
  <configure name="LIB_VERSION" value="0x663"/>
  <configure name="LIB_VERSION_NUMBER" value="6,6,3,0"/>
  <configure name="RELEASE_DATE" value="2010-07-21"/>
  <configure name="CONFIGURE" value="./configure "/>
  <configure name="PREFIX" value="/usr/local"/>
  <configure name="EXEC-PREFIX" value="/usr/local"/>
  <configure name="VERSION" value="6.6.3"/>
  <configure name="CC" value="gcc -std=gnu99 -std=gnu99"/>
  <configure name="CFLAGS" value="-fopenmp -g -O2 -Wall -pthread"/>
  <configure name="CPPFLAGS" value="-I/usr/local/include/ImageMagick"/>
  <configure name="PCFLAGS" value="-fopenmp"/>
  <configure name="DEFS" value="-DHAVE_CONFIG_H"/>
  <configure name="LDFLAGS" value="-L/usr/local/lib "/>
  <configure name="LIBS" value="-lMagickCore -llcms -ltiff -lfreetype -ljpeg -lpng -lfontconfig -lwmf -lwmflite -lXext -lXt -lSM -lICE -lX11 -lbz2 -lrsvg-2 -lgdk_pixbuf-2.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lxml2 -lz -lm -lgomp -lpthread "/>
  <configure name="CXX" value="g++"/>
  <configure name="CXXFLAGS" value="-pthread"/>
  <configure name="DISTCHECK_CONFIG_FLAGS" value="--disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-perl=no"/>
  <configure name="HOST" value="x86_64-unknown-linux-gnu"/>
  <configure name="DELEGATES" value="bzlib fontconfig freetype jpeg jng lcms png rsvg tiff x11 xml wmf zlib"/>
  <configure name="COPYRIGHT" value="Copyright (C) 1999-2010 ImageMagick Studio LLC"/>
  <configure name="WEBSITE" value="http://www.imagemagick.org"/>
  <configure name="QuantumDepth" value="16"/>
</configuremap>

identify -list configure:

Code: Select all

Path: /usr/local/lib/ImageMagick-6.6.3/config/configure.xml

Name          Value
-------------------------------------------------------------------------------
CC            gcc -std=gnu99 -std=gnu99
CFLAGS        -fopenmp -g -O2 -Wall -pthread
CONFIGURE     ./configure
COPYRIGHT     Copyright (C) 1999-2010 ImageMagick Studio LLC
CPPFLAGS      -I/usr/local/include/ImageMagick
CXX           g++
CXXFLAGS      -pthread
DEFS          -DHAVE_CONFIG_H
DELEGATES     bzlib fontconfig freetype jpeg jng lcms png rsvg tiff x11 xml wmf zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-perl=no
EXEC-PREFIX   /usr/local
HOST          x86_64-unknown-linux-gnu
LDFLAGS       -L/usr/local/lib
LIB_VERSION   0x663
LIB_VERSION_NUMBER 6,6,3,0
LIBS          -lMagickCore -llcms -ltiff -lfreetype -ljpeg -lpng -lfontconfig -lwmf -lwmflite -lXext -lXt -lSM -lICE -lX11 -lbz2 -lrsvg-2 -lgdk_pixbuf-2.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lxml2 -lz -lm -lgomp -lpthread
NAME          ImageMagick
PCFLAGS       -fopenmp
PREFIX        /usr/local
QuantumDepth  16
RELEASE_DATE  2010-07-21
VERSION       6.6.3
WEBSITE       http://www.imagemagick.org

Path: [built-in]

Name          Value
-------------------------------------------------------------------------------
NAME          ImageMagick
Thanks forward!
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Possible bug: partial clipping-path on jpg & tiff

Post by Drarakel »

It seems to be an issue with rsvg.
My ImageMagick version uses the internal SVG renderer - thus no problem. One can use ImageMagick with rsvg - which gets usually recommended. (See also here: http://www.imagemagick.org/Usage/draw/#svg)
Don't know why it has a problem here. I also tested the file with a standalone version of rsvg (v2.26.2, for Windows) - no complete clipping-path...

My ImageMagick installation uses this:
convert -list format
...
MSVG SVG rw+ ImageMagick's own SVG internal renderer
...
SVG SVG rw+ Scalable Vector Graphics (XML 2.4.19)
SVGZ SVG rw+ Compressed Scalable Vector Graphics (XML 2.4.19)

I suspect that your Windows system uses something similar. And your Unix server uses rsvg. Can you report the versions with "convert -list format"?

One more test - take only the clipping path:
069415A1.svg (Link deleted)
Now try a) "convert 069415A1.svg test1.png" and b) "convert MSVG:069415A1.svg test2.png" on the Unix server. The second version should show the correct pot handle - right?

A workaround would be to install ImageMagick without rsvg then.
Last edited by Drarakel on 2010-09-25T23:23:36-07:00, edited 1 time in total.
AxelF1983

Re: Possible bug: partial clipping-path on jpg & tiff

Post by AxelF1983 »

Thank you for your answer. You are right: The pot handle of the test1.png is not transparent, the test2.png is transparent.

This is the part of the file format:

Code: Select all

...
MSVG  SVG       rw+   ImageMagick's own SVG internal renderer
...
SVG  SVG       rw+   Scalable Vector Graphics (RSVG 2.18.2)
SVGZ  SVG       rw+   Compressed Scalable Vector Graphics (RSVG 2.18.2)
...
How can i install IM without rsvg? What i have to change then? Thanks for your help!
Post Reply