exist any way of enlarge only parts of determining color in imagemagick ?

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
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

exist any way of enlarge only parts of determining color in imagemagick ?

Post by diegomage »

exist any way in imagemagick or another technique from another software that I could use

for enrlage parts in blue like this

Image


Image


Please help me with this
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: exist any way of enlarge only parts of determining color in imagemagick ?

Post by snibgo »

You could break the problem into smaller problems like this:

1. Cut the image vertically into five pieces: two are blue, three are not blue.

2. Resize the blue pieces, enlarging them horizontally.

3. Append the five pieces together.

Is that what you want?

So, the smaller problem is determining where to make the cuts in (1). The image has roughly three colours: black, white and blue. After scaling to one row, each pixel either has some saturation (it is blue), or has no saturation. So threshold on some saturation. The border between black and white says where to make the cuts.
snibgo's IM pages: im.snibgo.com
Post Reply