Search found 10723 matches

by snibgo
2018-10-20T15:55:24-07:00
Forum: Users
Topic: Unwanted gaps between combined PNG images
Replies: 24
Views: 685

Re: Unwanted gaps between combined PNG images

I have not located a photo service website ... So, don't use a photo service website. Find somewhere to upload files . 1.) I save my plots into EPS files and convert (ImageMagick command) them to JPEGs, ... Please show use the exact commands you use, and sample EPS files that have this problem. Per...
by snibgo
2018-10-20T11:24:37-07:00
Forum: Users
Topic: Get coordinates Top, Left, size of some areas
Replies: 44
Views: 548

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

I had overlooked Fred's previous example showing multiple "-k" entries. This is how we can sort by field 3 (y) then field 2 (x), and this is cleaner than calling sort twice, so my script now has:

Code: Select all

 null: | awk 'NR>2 {print $2}' | sort -g -t "+" -k 3 -k 2`)
... and this works fine.
by snibgo
2018-10-20T04:43:21-07:00
Forum: Users
Topic: Get coordinates Top, Left, size of some areas
Replies: 44
Views: 548

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

Running Fred's script on Cygwin bash on Windows 8.1, I get the same results as cgkas, not Fred. The problem is in the sort, "-k 3,2". Sort with "--debug" says it can't find the key in any record. "sort --help" says: -k, --key=KEYDEF KEYDEF is F[.C][OPTS][,F[.C][OPTS]] for start and stop position, wh...
by snibgo
2018-10-19T16:30:11-07:00
Forum: Users
Topic: Unwanted gaps between combined PNG images
Replies: 24
Views: 685

Re: Unwanted gaps between combined PNG images

xinmude wrote:... the resulting PNG is larger, sometimes by nearly 50%, than its JPG counterpart.
For some images, PNG gives better compression than JPG. For others, JPG is better.

But if you are getting added borders around appended PNGs, something is wrong.
by snibgo
2018-10-19T16:11:00-07:00
Forum: Users
Topic: Replace color but only in some regions
Replies: 18
Views: 180

Re: Replace color but only in some regions

In bash, don't double the % signs, but do escape the parentheses: \( and \).
by snibgo
2018-10-19T15:10:58-07:00
Forum: Users
Topic: Replace color but only in some regions
Replies: 18
Views: 180

Re: Replace color but only in some regions

I don't know what you are doing with connected components. I would create a mask like this (Windows BAT syntax): convert ^ inGreen.png ^ -fuzz 20%% ^ -transparent #4CFE00 ^ -alpha extract -negate ^ -threshold 50%% ^ ( +clone ^ -define morphology:compose=Lighten ^ -morphology HMT 2x3+0+1:0,0,1,-,0,0 ...
by snibgo
2018-10-19T13:31:17-07:00
Forum: Users
Topic: Converting to monochrome images from RGB save little size
Replies: 7
Views: 102

Re: Converting to monochrome images from RGB save little size

Oops, sorry, my copy-paste went wrong. That last "-channel" should be "+channel", which restores the channel settings to the default.
by snibgo
2018-10-19T13:28:28-07:00
Forum: Users
Topic: rotate zoom - broke after update
Replies: 4
Views: 49

Re: rotate zoom - broke after update

The need for "+repage" has changed over the years, mostly because canvas dimensions and offsets have become more logical. A recent change is that "-append" and "+append" take the canvas from the first image, so we now often need "+repage" afterwards.
by snibgo
2018-10-19T12:36:58-07:00
Forum: Bugs
Topic: Converting Photoshop PDF with Transparency
Replies: 4
Views: 49

Re: Converting Photoshop PDF with Transparency

It converts fine for me, IM v7.0.7-28 and GS v9.19.
by snibgo
2018-10-19T09:39:22-07:00
Forum: Users
Topic: Replace color but only in some regions
Replies: 18
Views: 180

Re: Replace color but only in some regions

Please post a link to input.png, and ensure it really is a PNG, not a JPEG.
by snibgo
2018-10-19T05:06:03-07:00
Forum: Users
Topic: How to clear alt tags or change them?
Replies: 1
Views: 25

Re: How to clear alt tags or change them?

Exiftool is a better tool for changing metadata.
by snibgo
2018-10-19T02:18:49-07:00
Forum: Users
Topic: Replace all colours in image using another image
Replies: 3
Views: 97

Re: Replace all colours in image using another image

Another possibility is to crop the palette image into 1x1 images, and use "%[pixel:]" to create "-opaque" operations. Then include those operations in the main command. This doesn't eat memory, runs "magick" only twice, and reads each input only once each. Windows BAT syntax: for /F "usebackq tokens...
by snibgo
2018-10-18T15:20:14-07:00
Forum: Users
Topic: compose "over" + convert png->jpg + white background
Replies: 1
Views: 35

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: 18
Views: 180

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: 7
Views: 102

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