PNG to a Business Card

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
LiorB
Posts: 1
Joined: 2011-04-26T10:04:26-07:00
Authentication code: 8675308

PNG to a Business Card

Post by LiorB »

I have a flash which outputs a PNG file in 72DPI, I need to execute the following steps in order to make it ready for print:

1. Convert to 300DPI
2. Resize to 9x5 cm
3. Put `cross` on it
4. Save as PDF

With my little of tutorial reading + knowledge in IM, I got this far:
1. convert -units PixelsPerInch IMAGE.PNG -resample 300 IMAGE_300DPI.png
2. convert IMAGE_300DPI.png -resize 1111x639 IMAGE_300DPI_correct_size.png
3. composite -gravity center IMAGE_300DPI_correct_size.png cross.png card_new_with_cross.png
4. convert card_new_with_cross.png card_new.pdf

When I execute stage #4 everything changes and gets enlarged as far as I can tell, any Ideas?

by the way - 2 files (sideA.png & cross.png) can be found at:
http://www.bikur.co.il/sideA.png <-- the image
http://www.bikur.co.il/cross.png <-- the `cross-

It would be great if someone can help me with it
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: PNG to a Business Card

Post by anthony »

Note that actually a type of resize. As you are placing on using both, you are probably better off doing a single resize to the correct number of pixels, then just set the density directly. It will however mean you will need to do the pixel calculation yourself.

Hint: 2.56 cm = 1 inch

Also you should know that PNG files only store metric density units, but IM should convert to metric when saving automatically.

The trickiest part will however be the conversion to PDF. I myself don't have a lot of experience in that aspect.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply