Generating an EPS or TIFF CMYK image from text

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
jagku
Posts: 8
Joined: 2013-07-12T04:08:03-07:00
Authentication code: 6789

Generating an EPS or TIFF CMYK image from text

Post by jagku »

Hello,

I am trying to generate an EPS of tiff file using text entered by the user.

My code is as follows (I change 1.tiff to 1.eps when generating an EPS).

Code: Select all

convert -fill "cmyk(20%,30%,40%,10%)" -font "FreeSerifBold.ttf" -density 450 -pointsize 13 -antialias label:"www.company.com" -background None -colorspace cmyk 1.tiff
The generated tiff file cannot be read.
Can anybody see what I have missed?

Thanks for any help!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Generating an EPS or TIFF CMYK image from text

Post by snibgo »

I don't have that font. After removing that part of the command, it works fine for me, IM v.6.8.8-0 on Windows 8.1. The text is light but readable.

What version IM are you using? What is wrong with the result? You can put it somewhere like dropbox.com and paste the link here.
snibgo's IM pages: im.snibgo.com
jagku
Posts: 8
Joined: 2013-07-12T04:08:03-07:00
Authentication code: 6789

Re: Generating an EPS or TIFF CMYK image from text

Post by jagku »

Thanks.

The tiff file and free font can be found here:

https://www.dropbox.com/sh/f81176fan0wurqe/t78fHCvb4M

I have version: ImageMagick 6.5.7-8 (running it on Ubuntu)

Thanks!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Generating an EPS or TIFF CMYK image from text

Post by snibgo »

Your result looks perfect to me. What do you think is wrong with it?
snibgo's IM pages: im.snibgo.com
jagku
Posts: 8
Joined: 2013-07-12T04:08:03-07:00
Authentication code: 6789

Re: Generating an EPS or TIFF CMYK image from text

Post by jagku »

Hi,

Yes - that is very strange.
I tried it on another computer and it sprang up!
Thanks for spending time looking at this for me - I really appreciate it.

Do you know how to get rid of the white background (I would like it to be transparent)?

I have tried:

Code: Select all

convert -fill "cmyk(20%,30%,40%,10%)" -font "FreeSerifBold.ttf" -density 450 -pointsize 13 -antialias -background None label:"www.company.com"-depth 8 -colorspace cmyk 1.tiff
and

Code: Select all

convert -fill "cmyk(20%,30%,40%,10%)" -font "FreeSerifBold.ttf" -density 450 -pointsize 13 -antialias label:"www.company.com" -transparent "cmyk(0%,0%,0%,0%)" -depth 8 -colorspace cmyk 1.tiff
Thanks!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Generating an EPS or TIFF CMYK image from text

Post by snibgo »

The image is CMYK, and perhaps whatever you were viewing it with couldn't handle CMYK.

For a transparent background, insert "-background None" anywhere before the "label:".
snibgo's IM pages: im.snibgo.com
jagku
Posts: 8
Joined: 2013-07-12T04:08:03-07:00
Authentication code: 6789

Re: Generating an EPS or TIFF CMYK image from text

Post by jagku »

Thank you.

I tried:

Code: Select all

convert -fill "cmyk(20%,30%,40%,10%)" -font "FreeSerifBold.ttf" -density 450 -pointsize 13 -antialias -background None label:"www.company.com"-depth 8 -colorspace cmyk 1.tiff
However, the background is now appearing black?

Thanks!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Generating an EPS or TIFF CMYK image from text

Post by snibgo »

So you did. Sorry, I missed that.

It works fine for me. Perhaps your ancient version is causing problems. (You should also have a space before "-depth 8".) Try it without "-colorspace cmyk".
snibgo's IM pages: im.snibgo.com
jagku
Posts: 8
Joined: 2013-07-12T04:08:03-07:00
Authentication code: 6789

Re: Generating an EPS or TIFF CMYK image from text

Post by jagku »

Thank you - all working for TIFFs!
Post Reply