Netted fabric but no alpha

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
madhu
Posts: 20
Joined: 2011-07-06T22:34:20-07:00
Authentication code: 8675308

Netted fabric but no alpha

Post by madhu »

Hi,

I am working on the transparency of the fabric.
I have netted fabric on the blue background.
The link of image is http://imageshack.us/photo/my-images/27/bluenet.png/
But when I did " identify -verbose bluenet.png" ,it is showing Alpha value mean as "1".

I also want to know whether lighting effect also effects the Alpha value.



Thanks and Regards,
Madhu.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Netted fabric but no alpha

Post by fmw42 »

Alpha:
min: 255 (1)
max: 255 (1)
mean: 255 (1)



alpha of 1 for all three (min and max) or (mean alone) means fully opaque. you might as well turn it off -alpha off, then you still have an opaque image, but no alpha channel.

I am not sure what you mean by lighting affecting alpha. Lighting affects the image and generally not the alpha. The alpha channel is processed from your image or drawn manually. So if you image is very light and you do some thresholding to get an alpha channel, then yes, the results will be different for different lighting conditions and the same threshold value.
madhu
Posts: 20
Joined: 2011-07-06T22:34:20-07:00
Authentication code: 8675308

Re: Netted fabric but no alpha

Post by madhu »

Hi,

Thanks for the reply.
Is there any way to attain the alpha channel for a fabric with the background? I mean what are the necessary pre-requisites ?
Does the distance between the transparent cloth and the background also effects the alpha value.
I am asking this question because I have many images with the transparent fabric on the green background.
But that is also not showing any alpha channel.
So I am not sure whether there is any problem with cloth or photography!!!!



Thanks and Regards,
Madhu.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Netted fabric but no alpha

Post by anthony »

photographs can not capture transparency. It only captures color, or lack of colors (black), nothing more.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
madhu
Posts: 20
Joined: 2011-07-06T22:34:20-07:00
Authentication code: 8675308

Re: Netted fabric but no alpha

Post by madhu »

Hi,
anthony wrote:photographs can not capture transparency. It only captures color, or lack of colors (black), nothing more.
Then how to get the image with the transparency especially for the fabric ?
For an image that is taken how to get the alpha value.




Thanks and Regards,
Madhu.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Netted fabric but no alpha

Post by fmw42 »

As Anthony says, there is no alpha value in your image, just colors. The image has no way to know that the spaces between the fabric are transparent and showing the background color. If you make that assumption, then you can use

convert image -fuzz XX% -transparent yourbackgroundcolor resultimage

That will change your background color to transparent, i.e. remove the background. However note that this is not a very good technique as your fabric is a thin net and will have aliased with the background so that your background is not pure. So you will either have background remaining or lose much of your fabric depending upon the fuzz value you use.

Please clarify further what it is you are really trying to do? What result do you need from your image? Do you want to change the image to have it transparent between the fabric? Are you trying to remove the background?
Post Reply