Search found 10711 matches

by snibgo
2018-10-18T15:20:14-07:00
Forum: Users
Topic: compose "over" + convert png->jpg + white background
Replies: 1
Views: 22

Re: compose "over" + convert png->jpg + white background

Before you write the JPEG, flatten against white:

Code: Select all

{...} -background White -layers Flatten out.jpg
Yes, you had this, but in the wrong place.
by snibgo
2018-10-18T15:17:09-07:00
Forum: Users
Topic: Replace color but only in some regions
Replies: 3
Views: 43

Re: Replace color but only in some regions

Your second image has a PNG extension but is really a JPEG. This is lossy, which means some of your "green" pixels are really a different colour. Please don't post PNG images that are really JPEG. It confuses everyone. What do you want to do about the antialiasing around the green arcs? A way to app...
by snibgo
2018-10-18T15:05:00-07:00
Forum: Users
Topic: Converting to monochrome images from RGB save little size
Replies: 5
Views: 69

Re: Converting to monochrome images from RGB save little size

Sure. You can threshold alpha at 50%, then RGB, like this::

Code: Select all

$ for f in [SOURCE_DIRECTORY]/*; do convert "$f" -channel A -threshold 50% -channel RGB -negate -threshold 0 -negate -channel "[DESTINATION_DIRECTORY]/${f#[SOURCE_DIRECTORY]}"; done
by snibgo
2018-10-18T11:21:22-07:00
Forum: Users
Topic: Making semi-transparent white pixels in an image all a single color
Replies: 3
Views: 48

Re: Making semi-transparent white pixels in an image all a single color

As GeeMack says. To change "partially transparent" to "fully opaque", while leaving fully transparent unchanged, use "-threshold 0".
by snibgo
2018-10-18T07:54:16-07:00
Forum: Bugs
Topic: Purple haze when converting CR2 into JPG
Replies: 8
Views: 258

Re: Purple haze when converting CR2 into JPG

ImageMagick might call dcraw or ufraw-batch as external delegates, or use libraw internally. Try a convert with "-verbose". If an external delegate is used, IM will show the command used. "convert -version" or "magick -version" has a line "Delegates (built-in)". If that includes "raw", then it uses ...
by snibgo
2018-10-18T04:57:00-07:00
Forum: Users
Topic: Converting to monochrome images from RGB save little size
Replies: 5
Views: 69

Re: Converting to monochrome images from RGB save little size

That image has colour channels thresholded, but has many values for alpha. To get better compression, you should also threshold alpha, eg:

Code: Select all

magick 2dmcv8m.png -channel RGBA -threshold 50% +channel out.png
This reduces the size from 29 KB to 15 KB.
by snibgo
2018-10-18T03:35:51-07:00
Forum: Users
Topic: Converting to monochrome images from RGB save little size
Replies: 5
Views: 69

Re: Converting to monochrome images from RGB save little size

Your link is broken. How large are your images, in pixels? Simple arithmetic gives the bits per pixel. If this is less than one and the image is noisy, further shrinkage is hard. If your grayscale inputs are stored as three channels, and compressed efficiently, then storing them as single channel wo...
by snibgo
2018-10-17T13:47:36-07:00
Forum: Bugs
Topic: Purple haze when converting CR2 into JPG
Replies: 8
Views: 258

Re: Purple haze when converting CR2 into JPG

There may be a white balance problem. IM uses a delegate to read the raw file, and perhaps IM isn't telling the delegate to do white balance from the camera setting, or the delegate can't read the camera WB setting, or the camera isn't recording the WB, or other possibilities. What delegate does you...
by snibgo
2018-10-17T07:10:06-07:00
Forum: Bugs
Topic: Problems converting EPS into anything
Replies: 3
Views: 61

Re: Problems converting EPS into anything

Please post a link to your input eps.
by snibgo
2018-10-17T03:09:48-07:00
Forum: Users
Topic: Get coordinates Top, Left, size of some areas
Replies: 18
Views: 267

Re: Get coordinates Top, Left, size of some areas

Perhaps I misunderstand the question. I think cgkas simply wants the coordinates of the black connected components: magick Black_and_White.png -threshold 50% +write x.png -define connected-components:verbose=true -define connected-components:area-threshold=10 -connected-components 4 NULL: The first ...
by snibgo
2018-10-16T16:52:14-07:00
Forum: Bugs
Topic: Problem with "-set option:distort:scale" in IM6 and IM7
Replies: 2
Views: 63

Re: Problem with "-set option:distort:scale" in IM6 and IM7

distort.c has an explicit test for values less than 0.1, throwing an error: if ( output_scaling < 0.1 ) { coeff = (double *) RelinquishMagickMemory(coeff); (void) ThrowMagickException(exception,GetMagickModule(),OptionError, "InvalidArgument","%s", "-set option:distort:scale" ); return((Image *) NUL...
by snibgo
2018-10-16T08:48:10-07:00
Forum: Users
Topic: Replace all colours in image using another image
Replies: 2
Views: 74

Re: Replace all colours in image using another image

Doing this with a shell loop that reads "txt:" is the obvious method. The loop might build a command with many "-opaque" operations. But it can be done in a single magick command. Windows BAT syntax: magick ^ image.png +write mpr:ORIG ^ -set option:SIZE %%wx%%h ^ NULL: ^ ( palette_rgb.png ^ -unique-...
by snibgo
2018-10-16T08:00:47-07:00
Forum: Users
Topic: Rename image conversion to parent folder name
Replies: 1
Views: 42

Re: Rename image conversion to parent folder name

You would need to decide on the rules when in a nested folder, eg /mydir/mydir2/abc.pdf. What do you want the new name to be?

You might do this by setting a shell variable before the magick command, or renaming afterwards.
by snibgo
2018-10-16T04:30:05-07:00
Forum: Developers
Topic: Collating a collection of images into one PDF without holding them all in memory at once
Replies: 2
Views: 92

Re: Collating a collection of images into one PDF without holding them all in memory at once

I would convert each image to its own PDF, then use "pdfunite" to unite the PDFs into one.
by snibgo
2018-10-16T04:26:55-07:00
Forum: Users
Topic: convert: Maximum TIFF file size exceeded. `TIFFAppendToStrip' @ error/tiff.c/TIFFErrors/650
Replies: 1
Views: 45

Re: convert: Maximum TIFF file size exceeded. `TIFFAppendToStrip' @ error/tiff.c/TIFFErrors/650

Try "-define tiff:rows-per-strip=1".

Your command is very strange. You set the density to 300x300, then resample at the same density. Do you expect the resample to do anything?

You scale to a size, then resize to the same size. Do you expect the resize to do anything?