Search found 13038 matches

by snibgo
2020-05-02T23:55:29-07:00
Forum: Users
Topic: how to avoid loss of transparency due to overwriting color in png file
Replies: 5
Views: 1641

Re: how to avoid loss of transparency due to overwriting color in png file

An IM command could find the colour of a pixel, or the average of a number of pixels. You could use that in a script to determine whether that area had already been stamped.
by snibgo
2020-05-02T14:27:08-07:00
Forum: Users
Topic: How to convert a transparent PNG to black & white?
Replies: 6
Views: 1753

Re: How to convert a transparent PNG to black & white?

Code: Select all

magick in.png -channel RGB -fill Black -colorize 100 +channel out.png
"magick" uses v7 syntax. "convert" uses v6 syntax.

V7 is better than v6.
by snibgo
2020-05-02T13:42:42-07:00
Forum: Users
Topic: How to convert a transparent PNG to black & white?
Replies: 6
Views: 1753

Re: How to convert a transparent PNG to black & white?

What version of IM, on what platform? Please provide a sample input.

What does "by losing all textures" mean?
by snibgo
2020-05-02T10:31:24-07:00
Forum: Users
Topic: how to avoid loss of transparency due to overwriting color in png file
Replies: 5
Views: 1641

Re: how to avoid loss of transparency due to overwriting color in png file

That is like stamping a bingo card with semi-transparent ink. Each time you stamp the same place, you add more ink so less card will show through it.

The obvious solution is to not repeatedly stamp the same place.
by snibgo
2020-05-01T06:10:54-07:00
Forum: Users
Topic: convert from svg to pdf size incorrect
Replies: 14
Views: 3034

Re: convert from svg to pdf size incorrect

invalid argument for option '-resize': -extent Your command is bad. "-resize" needs size arguments. So does "-extent". As you are using IM v7, I suggest you use "magick", not "convert". Windows BAT syntax: magick rose: -density 300 -resize "2598x2478^!" x.pdf According to Adobe Acrobat Reader, x.pd...
by snibgo
2020-05-01T05:17:42-07:00
Forum: Users
Topic: convert from svg to pdf size incorrect
Replies: 14
Views: 3034

Re: convert from svg to pdf size incorrect

Your arithmetic is incorrect. 8.26 inches multiplied by 300 pixels per inch is 2478 pixels, not 2178.

"-resize 2598x2478" will resize the image to fit inside that box. If you want to ensure the result is exactly that size, either use "!" or "-extent" after the "-resize".
by snibgo
2020-05-01T03:50:09-07:00
Forum: Users
Topic: convert from svg to pdf size incorrect
Replies: 14
Views: 3034

Re: convert from svg to pdf size incorrect

You might want a "-density" before reading the SVG.

Your "-size 2598x2480" does nothing. It has no effect. Is that a typo for "-resize 2598x2480"?
by snibgo
2020-04-30T06:08:30-07:00
Forum: MagickWand
Topic: Exception
Replies: 11
Views: 2914

Re: Exception

Arunkumar wrote:insufficient image data in file
Either the JPEG file is corrupt, or your program has a bug, or both.

Try reading the JPEG file with "magick" or "convert". Does that report the same error?
by snibgo
2020-04-29T10:03:36-07:00
Forum: MagickWand
Topic: Exception
Replies: 11
Views: 2914

Re: Exception

Sorry, I can't help you with Unix system management.
by snibgo
2020-04-29T08:53:11-07:00
Forum: MagickWand
Topic: Exception
Replies: 11
Views: 2914

Re: Exception

Probably because you don't have enough free space on /tmp.
by snibgo
2020-04-26T10:14:59-07:00
Forum: Users
Topic: write a number inside a circle with condition that font size should be automatic
Replies: 14
Views: 3329

Re: write a number inside a circle with condition that font size should be automatic

Sorry, I didn't notice you had "-gravity Center". So insert "-gravity NorthWest" before "-geometry".
by snibgo
2020-04-26T08:50:16-07:00
Forum: Users
Topic: write a number inside a circle with condition that font size should be automatic
Replies: 14
Views: 3329

Re: write a number inside a circle with condition that font size should be automatic

Or use the method I showed you upthread:

Code: Select all

magick -size 100x100 caption:1 -trim -gravity center -background white -extent 100x100  in.png +swap -geometry +10+10 -composite out.png
by snibgo
2020-04-26T04:13:24-07:00
Forum: Users
Topic: write a number inside a circle with condition that font size should be automatic
Replies: 14
Views: 3329

Re: write a number inside a circle with condition that font size should be automatic

(50,50) is half of (100,100), so the label goes in the top-left of in.png, so there was no need to mention (50,50).

In the more general case, before "-composite" we need "-geometry +X+Y" where X and Y are numbers or %[fx:] expressions for the required position of the top-left pixel of the label.
by snibgo
2020-04-26T01:36:12-07:00
Forum: Users
Topic: add image as new channel
Replies: 1
Views: 1152

Re: add image as new channel

IM doesn't have spot colours.

Recent IM v7 can probably handle user channels internally, but there seem to be no CLI options to add user channels, process them, or remove them.
by snibgo
2020-04-26T01:11:14-07:00
Forum: Users
Topic: one jpg use much more time than another jpg to add text
Replies: 4
Views: 1609

Re: one jpg use much more time than another jpg to add text

IM "-strip" will remove the metadata. However, these are CMYK images with embedded profiles, and "-strip" will remove the profile. "exiftool -all=" has the same problem. IM can save the profile to a temporary file, then strip, then restore the profile. Saving JPEG causes losses, so we can save as lo...