Page 1 of 1

IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-01-27T23:45:58-07:00
by Nik
Hi,

I'm trying to use IM to convert a PDF to a JPG but I'm getting a very strange conversion on a mac G5 PowerPC.

I have a mac intel machine running OS 10.5.8, IM version 6.6.7-1 and GS version 9.00 and the conversion looks fine.
The other machine is mac G5 PowerPC running 10.5.8 IM version 6.6.7-1 and GS version 9.00 and the conversion looks very odd.

One area of the PDF that I'm converting has a red circle with white text on it and the conversion from the G5 turns the white text pink, almost like an overprint effect. The same sort of thing is happening to black text on top of a yellow background, the black text turns brown. I have checked the PDF and the white text is set to knockout and so I can't understand why the conversion on the G5 is so different.

If anybody has any suggestions please let me know.

Many thanks,
Nik

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-01-28T14:07:10-07:00
by fmw42
check your versions of ghostscript.

make sure the images are the same (including colorspace) - compare the results from the verbose info (identify -verbose info:). if the jpg is cmyk then you could have some problem and need to convert to rgb. make sure you don't have multiple version of ghostscript or IM that could be getting versions confused.

Post links to your examples and identify your exact commands.

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-01-28T15:23:38-07:00
by Nik
Hi,

Thanks for your response. I have checked the version of IM & GS on both machines and they're as I stated previously.

Here is the resulting jpg from the PowerPC G5:
http://uploading.com/files/22mc48ad/res ... werPC.jpg/
& here is the identify log:
http://uploading.com/files/get/6ema2mm1 ... %20G5.txt/

Here is the resulting jpg from the Intel Mac:
http://uploading.com/files/cd859d2b/res ... 2BMac.jpg/
& here if the identify log:
http://uploading.com/files/m82731bd/IM% ... intel.txt/

Lastly here is the file I'm trying to convert:
http://uploading.com/files/7a167f5d/48-10-001-ST.pdf/

The command I used to achieve the above are:
/opt/local/bin/convert -units PixelsPerInch -define pdf:use-trimbox=true -density 150 'input.pdf' -resize 600x600 'output.jpg'

Many Thanks,
Nik

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-01-28T15:42:25-07:00
by fmw42
It looks to me like you may have a mix of rgb and cmyk images imbedded in the pdf.

IM sees the cmyk as the colorspace. If I assume this and convert to rgb, as follows, I get a mix of good and bad parts.

convert -colorspace rgb -units PixelsPerInch -define pdf:use-trimbox=true -density 150 48-10-001-ST.pdf -resize 600x600 48-10-001-ST.jpg

I am not an expert on conversion of pdf or cmyk colorspaces, but perhaps your two systems (or viewers) are using different profiles to deal with cmyk.

I don't know if this will help, but you could specify cmyk profile and convert to rgb. See http://www.imagemagick.org/Usage/formats/#profiles

I tried this:

convert -units PixelsPerInch -define pdf:use-trimbox=true -density \
150 48-10-001-ST.pdf -profile Profiles/USWebCoatedSWOP.icc -profile Profiles/sRGB.icc \
-resize 600x600 48-10-001-ST_cmyk2rgb_profiles.jpg

but got pretty much the same as using -colorspace rgb

PS I am on a G4 PowerPC Mac OSX Tiger, IM 6.6.7.3 Q16 (hdri)

There have been similar issues reported with cmyk jpgs on PowerPC Macs.


You might also check your delegates.xml file and see if your two systems are using a different pdf ghostscript device. I think the default is to use one attuned to transparency in pdf and not perhaps best for cmyk. But again I am not an expert on these devices.

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-01-28T16:12:20-07:00
by Nik
Hi,

Thanks for the reply.

I just tried to include an input and output profile but still getting the same conversion.

I will take a look at the delegates file and see if I can see anything odd.

Thanks again,
Nik

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-01-28T16:59:17-07:00
by fmw42
I also had tried (see above) using profiles, but that did not work any better than using -colorspace.

This issue has been discussed previously on one of the forums (user, devel or bugs), so you could search the forums and try to track it down. But I don't know if there was any good solution found.

Here is a PM comment from another user more expert than I on an issue that appears related:

"I know that there are differences in the structure of the Photoshop CMYK JPGs and the ImageMagick CMYK JPGs (differences that are 'normal' and should be decoded by every application that pretends to understand CMYK)"

and another comment:

"Well, my first thought with all this had been that it has something to do with the different APP14 (Adobe) markers in CMYK JPGs. (The CMYK JPGs from Photoshop are stored in a YCCK format - including the necessary YCCK 'ColorTransform' tag in the APP14 profile. These are the only normal CMYK files that Mac Preview seems to decode correctly so far. And ImageMagick can't directly create the YCCK format - only basic CMYK.)"

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-01-29T15:17:57-07:00
by Nik
Thanks again for the reply

I've exhausted as many options as possible without success so I decided to try and install and older version of IM.

The PowerPC has the latest version of IM only because it's and old machine that's become available to use as a thumbnail creation server, hence the use of IM. I installed MacPorts and it installed the latest version of IM & GS. Whilst trying to work out why the strange pdf to jpeg color conversion was happening I remembered that I had another PowerPC G5 that I'd installed IM onto a while back when I ran my convert commands on this machine the conversion was perfect. So to prove to myself that it was the latest version of IM that was causing the problem I first updated the version of GS and re-ran my tests and still the conversion was good so then I updated the version of IM and then I started to see the same conversion problems. My thoughts are now that I need to deactivate the current version of IM and try installing and older version of IM. I've attempted to do this using this process: http://trac.macports.org/wiki/howto/InstallingOlderPort. Unfortunately I'm running into problems doing this as well so any other suggestions of how to install an older version of IM would be appreciated.

Thanks,
Nik

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-01-29T16:08:46-07:00
by fmw42
You should check the versions of libjpeg on your computers. It could be differences in libjpeg and perhaps not IM or the MacPorts version of libjpeg is not working correctly?

I am not much of an expert on MacPorts and have been struggling myself with it. I use it to update all my delegates but manually install IM from source in /usr/local/bin so I can keep IM up-to-date faster than MacPorts. Right now I am having trouble with FFTW for Fourier Transforms. It runs fine is manually installed in /usr, but causes errors when run from /opt as installed by MacPorts. Sorry I cannot help much with MacPorts issues.

Seems like MacPorts has trouble with some delegates for PowerPC, but they seem to work fine on Intel machines as per both our problems.

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-01-31T04:08:18-07:00
by Nik
Hi,

I'm not sure how to check the version of libjpeg but that aside it doesn't seem to matter if I convert to a tif or png I still get the same results as in my previous link.

This problem is so annoying as IM does exactly what I want in that it converts a pdf to its trim size and turns it into a thumbnail image!!!

Thanks,
Nik

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-01-31T10:31:00-07:00
by fmw42
How did you create the PDF (in what application) and where did the image parts come from. Is it possible that the image is a mix of cmyk and rgb images?

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-01-31T13:56:44-07:00
by Nik
The PDF was exported from InDesign CS4 as 1.4 PDF and the embeded image is CMYK as well as all other elements of the PDF.
Just as another test I upgraded another Intel ma to the latest version of IM/GS and the conversion was perfect. It really just seems to be whatever the difference is between running IM on a PowerPC as apposed to an Intel mac!!!!!

Thanks,
Nik

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-01-31T14:48:17-07:00
by fmw42
Nik wrote:The PDF was exported from InDesign CS4 as 1.4 PDF and the embeded image is CMYK as well as all other elements of the PDF.
Just as another test I upgraded another Intel ma to the latest version of IM/GS and the conversion was perfect. It really just seems to be whatever the difference is between running IM on a PowerPC as apposed to an Intel mac!!!!!

Thanks,
Nik

Yes, I am having some other similar issues on my PowerPC Mac OSX Tiger system that do not show up with the INTEL Macs.

Unfortunately, it is hard to tell if any of these issue (yours or mine) are an IM or a PowerPC vs Intel issue and the IM developers do not have a PowerPC system to my knowledge to test with.

Have you tried the latest version of IM 6.6.7.4?

Other issues I have run across are disabling openmp esp on a PowerPC one process Mac. That has made some things work for me and two are you compiling IM and all the delegates manually in /usr/local/bin or with MacPorts in /opt/local/bin. I am having some problems with the same software when compile via MacPorts where it works if I compile manually.

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-02-01T08:09:12-07:00
by Nik
Hi,

I'm installing IM using MacPorts into /opt/local/bin/.

I wasn't aware that there was a version 6.6.7-4. I ran a port list and it still says that the only available port is 6.6.7-1. Perhaps the MacPorts site has not been updated.

This problem is driving me mad now!!!! I found another PowerPc in the office today and installed IM & GS. This time the OS is Tiger and I still ran into the same problems, but I can't replicate these problems on an Intel. As you said I just can't identify if the error is being caused by the processor type or the version of IM.

Could you point me in the right direction for downloading an old version of IM and installing it manually. I know that I've used IM on a PowerPC before without any problems, I just can't remember if I was converting a PDF. If I was then it would suggest that it's the version of IM rather than the processor!

Thanks,
Nik

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-02-01T11:00:34-07:00
by fmw42
To install from source, see http://www.imagemagick.org/download/www ... .html#unix. It is pretty straightforward.

Download and decompress to a folder
CD to the folder
./configure
make
sudo make install

This however installs at /usr/local/bin and not /opt/local/bin

I install this way, but use MacPorts to install everything else. I don't use MacPorts to install IM as I want to have the most current IM version. So I don't know how to install manually to /opt/local/bin without MacPorts. If you figure that out, let me know.

Advanced notes are at:
http://www.imagemagick.org/script/advan ... lation.php

If you install IM to /usr/local/bin rather than /opt/local/bin, then you need to be sure your .profile file is set up properly and your ./configure file includes:

CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib'


So for example, when I install IM to /usr/local/bin but have my other delegates in /opt/local/bin, my ./configure file is as follows:


./configure CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
--enable-delegate-build --enable-shared --disable-static \
--with-modules --with-quantum-depth=16 --with-gslib --without-wmf \
--disable-silent-rules --disable-dependency-tracking --disable-openmp \
--with-gs-font-dir=/opt/local/share/ghostscript/fonts/ --with-lqr

Note I have disabled openmp even though I have only one processor as I found other problems occur without doing so.

My .profile is as follows:

##
# DELUXE-USR-LOCAL-BIN-INSERT
# (do not remove this comment)
##
echo $PATH | grep -q -s "/usr/local/bin"
if [ $? -eq 1 ] ; then
PATH=$PATH:/usr/local/bin
export PATH
fi
export PATH="${PATH}:/Users/fred/Applications/ImageMagick-Scripts/bin"
export DISPLAY=:0


##
# Your previous /Users/fred/.profile file was backed up as /Users/fred/.profile.macports-saved_2010-04-21_at_17:53:31
##

# MacPorts Installer addition on 2010-04-21_at_17:53:31: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.


I have older delegates install also in /usr/local/bin and so if I run everything there including IM then my ./configure file is as follows:

./configure --enable-delegate-build --enable-shared --disable-static \
--with-modules --with-quantum-depth=16 --with-gslib --without-wmf \
--disable-silent-rules --disable-dependency-tracking --disable-openmp \
--with-gs-font-dir=/usr/local/share/ghostscript/fonts/ --with-lqr


and my .profile is as follows:


##
# DELUXE-USR-LOCAL-BIN-INSERT
# (do not remove this comment)
##
echo $PATH | grep -q -s "/usr/local/bin"
if [ $? -eq 1 ] ; then
PATH=$PATH:/usr/local/bin
export PATH
fi
export PATH="${PATH}:/Users/fred/Applications/ImageMagick-Scripts/bin"
export DISPLAY=:0


Archive IM release are located at:

http://ftp.nluug.nl/ImageMagick/

I hope this helps.


If you do any Fourier Transform processing using IM with the FFTW delegate, you could help me by trying to confirm my issues. But if you don't do any of that, then don't worry about it.

Let me know what you find and if you want me to try to duplicate your results on my PowerPC Mac Mini OSX Tiger.

P.S. Magick (the IM developer) has an INTEL Mac and does not see any of my problems. So there does seem to be some issue between Intel and PowerPC Macs with IM. But I am not sure if it is an IM or a Mac issue.

Fred

Re: IM 6.6.7-1 not working correctly on PowerPC G5

Posted: 2011-02-01T20:33:41-07:00
by fmw42