Transparency + CMYK file formats for scribus import

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?".
Post Reply
Moini
Posts: 5
Joined: 2012-11-27T07:40:42-07:00
Authentication code: 6789

Transparency + CMYK file formats for scribus import

Post by Moini »

I'm trying to achieve this:

- create an image file with transparency (binary or alpha), using a certain ICC profile for CMYK color space, from a png file
- this new image file (whichever format makes sense, possibly tiff or psd) needs to be imported into scribus without loss of transparency (alpha preferable, binary second-best)

I cannot achieve this with the graphical tool separate+ from gimp, it doesn't allow for transparency (background becomes black).

Is this possible with this version of imagemagick on Linux / Shell / ImageMagick 6.6.0-4 2012-05-02 Q16 ?

Which steps do I have to perform on the png image?

Thank you!!!!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Transparency + CMYK file formats for scribus import

Post by fmw42 »

this seems to work for me, but I do not know what is your cmyk profile. (I also have USWebCoatedSWOP.icc for cmyk)


Input:

http://www.fmwconcepts.com/misc_tests/c ... /logot.png

identify -verbose logot.png
Image: logot.png
Format: PNG (Portable Network Graphics)
Class: DirectClass
Geometry: 640x480+0+0
Units: Undefined
Type: PaletteAlpha
Endianess: Undefined
Colorspace: sRGB
Depth: 8-bit


convert logot.png -alpha off -profile images/Profiles/sRGB.icc -profile images/Profiles/CMYK.icc -alpha on logot.tiff


Result:

http://www.fmwconcepts.com/misc_tests/c ... logot.tiff

identify -verbose logot.tiff
Image: logot.tiff
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 640x480+0+0
Units: PixelsPerInch
Type: ColorSeparationAlpha
Base type: ColorSeparation
Endianess: MSB
Colorspace: CMYK
Depth: 8-bit
...

Properties:
date:create: 2012-11-27T11:02:07-08:00
date:modify: 2012-11-27T11:02:07-08:00
signature: 70791a5edcd50b8807adb4473cd700439421e0e095283ed3ea74dd3e0979d131
tiff:alpha: unassociated
tiff:document: logot.tiff
tiff:endian: lsb
tiff:photometric: separated
tiff:rows-per-strip: 480
Profiles:
Profile-icc: 54504 bytes
Description: Generic CMYK Profile

Manufacturer: Generic CMYK Profile
Model: Generic CMYK Profile
Copyright: Copyright Apple Computer, Inc. 1998 - 2002
Moini
Posts: 5
Joined: 2012-11-27T07:40:42-07:00
Authentication code: 6789

Re: Transparency + CMYK file formats for scribus import

Post by Moini »

//EDIT: I got the name of the color profile wrong, it was sRGB.icm, I hadn't expected that.

It works perfectly with scribus. Thank you very much!!!


(((When I try this:


convert Ping.png -alpha off -profile sRGB.icc -profile ISOcoated_v2_300_eci.icc -alpha on Ping.tiff

I get this result:

convert: unable to open image `sRGB.icc': gick-6.6.0/modules-Q16/coders/meta.la @ error/blob.c/OpenBlob/2489.
convert: unable to open image `sRGB.icc': h�d�^ @ error/blob.c/OpenBlob/2489.
convert: unable to open file `sRGB.icc': �7 @ error/blob.c/FileToBlob/831.

Maybe the profiles must somehow be marked as input- and output-profile?

The png-file you chose doesn't have transparency as far as I can see, so one cannot really see if it worked.
Here is a file with alpha transparency, for example: http://m23.sourceforge.net/fotos/gfx/opensuse120.png)))
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Transparency + CMYK file formats for scribus import

Post by fmw42 »

PNG file did indeed have transparency (alpha channel). But if you open it in the browser the transparency will be against white background so you won't see it. Download it and then open it in IM or some other viewer besides a browser.

For your profiles, you have to provide the path to them if not in the same directory as your images. Do you actually have both profiles on your system? Check the names also to be sure you spell them correctly and that you have the right suffix.

Also you said you had sRGB.icm, but you typed sRGB.icc ???

I downloaded icc version of your cmyk profile and ran it on your image:

convert opensuse120.png -alpha off -profile images/Profiles/sRGB.icc -profile images/Profiles/ISOcoated_v2_300_eci.icc -alpha on opensuse120.tiff

Here is the result:

http://www.fmwconcepts.com/misc_tests/c ... se120.tiff
Moini
Posts: 5
Joined: 2012-11-27T07:40:42-07:00
Authentication code: 6789

Re: Transparency + CMYK file formats for scribus import

Post by Moini »

Hi - I edited my post :-) Obviously, that wasn't obvious enough.

The first part is the current state, while the part in triple brackets was my old, erroneous post where I had wrongly written icc instead of icm.

Thank you again!
Moini
Posts: 5
Joined: 2012-11-27T07:40:42-07:00
Authentication code: 6789

Re: Transparency + CMYK file formats for scribus import

Post by Moini »

Is there a similar function to convert the colorspace of an svg-image (created in inkscape, saved as normal svg, not inkscape svg) ?

If I only change the file names in the above command (e.g. for input: test.svg, for output: test1.svg) and run identify -verbose on that new picture, I get the result that the color profile is still rgb. So - if it works somehow with imagemagick - the command must be something different for svg files.

The svg file also contains objects with gradient and opacity properties.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Transparency + CMYK file formats for scribus import

Post by fmw42 »

SVG files are vector files and are different from pixel images. IM has to pixelize them first. See http://www.imagemagick.org/Usage/formats/#vector
Moini
Posts: 5
Joined: 2012-11-27T07:40:42-07:00
Authentication code: 6789

Re: Transparency + CMYK file formats for scribus import

Post by Moini »

Ah - that's a pity... but it explains a lot :-)

Thank you very much for your help!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Transparency + CMYK file formats for scribus import

Post by fmw42 »

Moini wrote:Ah - that's a pity... but it explains a lot :-)

Thank you very much for your help!

Apart from the pixelizing, I am not that much an expert on SVG files. So some one else more experienced may have some further suggestions or information. Look in the svg file and see if the colorspace is defined there. If so, then just edit it.
Post Reply