Problem with a convert

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?".
Locked
troyd1
Posts: 73
Joined: 2007-07-29T17:13:19-07:00

Problem with a convert

Post by troyd1 »

I have this convert. There is a slight problem with the syntax. It actually works, but it gives me the error: convert: no such image `@c:\temp\graphics\3_T_3.TXT'.

Here is the convert:
convert -fill black -pointsize 12 -font "c:\pcshare\pcgraphics\itweb\fonts\ARIAL.TTF" -size 1000 -gravity west -background #00000000 caption:@c:\temp\graphics\3_T_3.TXT +swap -gravity east -chop 770x0 c:\temp\graphics\X7999_43714.png +swap -gravity northwest -geometry +123+117 -composite c:\temp\graphics\X7999_43714.png

What am I doing wrong or how can I rewrite this better?

What I am doing is trying to fill a text field with periods so I created a text file with the text I want to caption with a binch of periods after it. I am creating it 1000 wide and then chopping it. I am then compositing it with the graphic that I am calling out.

Thanks, Troy

troyd1
Posts: 73
Joined: 2007-07-29T17:13:19-07:00

Re: Problem with a convert

Post by troyd1 »

Any suggestions from the experts?

User avatar
anthony
Posts: 8884
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Problem with a convert

Post by anthony »

Look at http://imagemagick.org/Usage/annotate/

and try breaking up your command into smaller steps to ensure each step is doing what you expect.

You can insert -info to output image size info
and -write x: to display what images are in the current image sequence at that point in your command.

These two methods is the key to debugging a complex compound IM command.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Problem with a convert

Post by el_supremo »

I think the problem is the first +swap
At that point in the command line there is only one image so the swap can't do anything.
I tested it and I get the same kind of error.
Remove the first +swap and try again.

Perhaps swap could give a better error message when there's only one image?

Pete

troyd1
Posts: 73
Joined: 2007-07-29T17:13:19-07:00

Re: Problem with a convert

Post by troyd1 »

I believe that I figured it out. I had quotes around the caption file after the @ sign. I took them out and the error went away.

Thanks

mro7805

Re: Problem with a convert

Post by mro7805 »

I'm new to using IM and I am using it for a project i am working on.. and every i try to convert my pdf into a jpg it rotates it... does anyone know why that is happening? I dont want the files to rotate.. i want them to just convert as they are into a jpg.

"convert -quiet -quality 100 -density 96 -resize 950x ".$_FILES['image']['tmp_name']." /tmp/".$tmp_file.".jpg";

it rotates the image.. i dont know if it has something to do with it being landscape or what? but if i put

"convert -rotate '90<' -quiet -quality 100 -density 96 -resize 950x ".$_FILES['image']['tmp_name']." /tmp/".$tmp_file.".jpg";
its doesnt rotate it but when you upload non-landscape items it rotates it..

thanks,

moe

Locked