Page 1 of 1

How should I select specific transparent pixels in tiff file?

Posted: 2019-06-14T02:56:40-07:00
by nischaynamdev
I wanted to select transparent pixels starting from coordinates:
x = 1 / y=1 / tolerance=0px

and then Stop selection where the edge of the image starts.

Transparent pixels ' within the image should not select, only the boundary/edges of the image should be selected. I tried different command but I'm unable to achieve this. can somebody help

Re: How should I select specific transparent pixels in tiff file?

Posted: 2019-06-14T03:41:03-07:00
by snibgo
What version of IM, on what platform?

The top-left pixel is at (0,0), so (1,1) is in the next column and next row.

I don't understand what you want. IM doesn't really "select" pixels. Instead, we make a mask image where two colours represent selected or not selected. The mask can then be used to process just the "selected" pixels.

"-alpha extract" will make an image that is black where pixels were transparent. Then you could make all pixels except edge pixels white, with "-draw rectangle". Then you might flood-fill from top-left.

Perhaps you can supply a sample input, and say what the output should be.

Re: How should I select specific transparent pixels in tiff file?

Posted: 2019-06-14T03:55:13-07:00
by nischaynamdev
Hi, thanks for the reply.
I'm using the 7th version and would like to implement it on ubuntu server.

here what exactly I'm trying to do: < these are product images for e-commerce store>

- first Increase canvas size with 2 pixels horizontal and 2 pixels vertical (relative)
- Select all transparent pixels starting from coordinates x = 1 / y=1 / tolerance=opx. Stop selection where the edge of the product starts. Transparent pixels 'within the product are not selected, only the boundary/edges of the product.
- Invert selection
- Create a work path from selection
- Set name of clipping path to 'Path 1'
- Decrease canvas size with 2 pixels horizontal a 2 pixels vertical (relative)
- Save file

Re: How should I select specific transparent pixels in tiff file?

Posted: 2019-06-14T04:15:27-07:00
by snibgo
IM cannot create clipping paths.

Re: How should I select specific transparent pixels in tiff file?

Posted: 2019-06-14T05:02:02-07:00
by nischaynamdev
isn't there any solution ?

Re: How should I select specific transparent pixels in tiff file?

Posted: 2019-06-14T05:57:53-07:00
by snibgo
nischaynamdev wrote: - Create a work path from selection
- Set name of clipping path to 'Path 1'
This is vectorization, conversion of a raster image (pixels) into vectors. IM can't do that. Programs that can include:

Potrace
Autotrace
Inkscape
Gimp
traceContours (by me, unpublished)