How to edit transparency pixels in a FilterPlugin?

I want develop a fiter plugin of photoshop. while i am not clearly about some issues:
(1) how does the photoshop provide the transparency data ( blank data ) to me ?
in other words, i want obtain the "alpha" channel data, is this provided by the "inData" together with other channels?
(2) I want to change the pixel's transparency, means i want change totally transparent pixels into
opaque. how to do it ?
(3) in the pluginName.r file,there are 7 entries in FilterCaseInfo like following. is there anything i must pay special attention to?
  FilterCaseInfo
    /* Flat data, no selection */
    inWhiteMat, outWhiteMat,
    doNotWriteOutsideSelection,
    filtersLayerMasks,
    worksWithBlankData,
    copySourceToDestination,
By the way, When i invoke a filter (i develop it 2 yeas ago) on the transparency document , photoshop gives a messagebox said it canot invoke the fiter because the selection area is totally empty.
if the area has both transparency and opaque pixels, then the plugin cause write access faled and made the photoshop crash ,  why does this happen, how to avoid it.
Thanks a lot.!

First off, don't confuse "alpha" with "transparency" they are different.
If I create a RGB document with one layer and call the Dissolve example I get the following bits of information in the FilterRecord:
planes = 4
imageMode = 3 // plugInModeRGBColor
filterCase = 4 // filterCaseEditableTransparencyNoSelection
inLayerPlanes = 3
inTransparencyMask = 1
plane 0 = red, 1 = green, 2 = blue, 3 = transparency
See DoFilter, the loop on the planes, and DissolveRectangle, the changing of the data on each plane, in the Dissolve.cpp example file.
Now flatten the document and create an alpha channel and select all channels via the channels panel. Selecing just the alpha channel or any one channel will have different results.
planes = 4
imageMode = 3 // plugInModeRGBColor
filterCase = 2 // filterCaseFlatImageWithSelection
inLayerPlanes = 0
inTransparencyMask = 0
inNonLayerPlanes = 4
There is some documentation about FilterCaseInfo in the Plug-in Resource Guide.pdf found in the documentation folder.

Similar Messages

  • How do i stop PS from deleting transparent Pixels on layers?

    Hello community,
    i have a problem concering the place-function of Photoshop CS6. I want to include hundreds of png files in a psd file and i want them to keep their original size. Unfortinatly they have transparent borders and PS deletes these borders when you place the images in the PSD-file. For example: I have a square with x=50px and y=50px and it is positioned in an png with the dimensions x=100px and y=100px. I want to have these kind of files in my psd-file an need to keep their full dimensions, because my graphic specifications relate to the 100px/100px size and i need it later in my workflow.
    How do i stop PS from cutting off the tranparent borders of my images?

    Yes Free Transform has what was set during the place and you can see in the option bar if the layer has been scaled or is at 100 % width and height. You can also drag out guide line to the transforms bounding box. Then later measure the size or drop in a low opacity pixel in two diagonal corners to force the bounds to the png's canvas size.   However if you don't add those pixels in a script the bounds you get is that of the bounds of the non transparent pixels and in an action Ctrl|CMD clicking the layers content in the layers palette selects the non transparent pixels.
    My Photoshop Photo Collage populating scripts do not always fill an image area when they resizing odd shaped png images, However if the png is rectangular with transparent borders the script will fill the area with pixel for the scripts gets the bounds of the non transparent pixels, not the png canvas size. So resizing works well. There is a difference between layer size and canvas size in the png file. Layers can also be larger then canvas size in psd files Photoshop support any size layer you have the canvas act like a cropping mask on a document.
    Message was edited by: JJMack

  • How to color overlay on non-transparent pixels only?

    So I need help to make a layer that is a solid color that overlays over everything underneath it but only applies to non-transparent pixels. Is there any way to do this?

    Well see, there's a lot of layers underneath it and the things that I want the color to be overlayed on changes often because I only want a few layers shown at a time.
    Here, let me try to explain. I made a .psd file with a bunch of characters for a video game. All of the characters have the same body but different heads. I made layers for the body and all of the heads (the background is transparent.) The base layers of the heads and body is grey and then I created layers above them that were color and applied an overlay that was only as big as the head/body for every color. This quickly became tedius because of how many heads there were and I thought since the head and body are supposed to be the same color anyway I might as well created a layer that's a solid color above the heads and bodies that overlays everything. However, the problem is that color also covers the background and I only want the parts of the character to be colored.
    Also, what kind of adjustment layer? Would that still be applicable in this situation?

  • How do you eliminate transparent pixels caused by glare coming from a painting and still retain org.

    How do you eliminate transparent pixels caused by glare from the sun coming off a painting and still retain orginal color and composition?

    You'll need to post the image for us to give advice.
    In general, the glare cannot be removed.  You can clone over the glare, but the cloned areas will not be the original underlying painting.  Depending on your image, acceptable solutions might be possible, as long as you are aware of what is actually being done.
    Ken

  • I want to delete all transparent pixels, how can I? CS6

    I would like to delete all transparent pixels surrounding my irregularly (non-square) image.  The TRIM function only trims to a square surrounding my image and not to the edge of the image itself.  Is there a work around for this?  I have looked around and haven't found one. 
    Thanks,
    JB

    Image have rectangular area they have a width and height boundaries as do layer.  Not all of the rectangular area need to have content or be fully opaque,  However the image boundary is a rectangle.  Some file formats are like a Photoshop Background layer do not support empty area or even transparency so those file formats only contain image that are rectangles and have no transparency. Some file formats support transparency and empty areas so those images can be any shape and contain transparency still the image boundary is rectangular. Then there is the GIF file format an oddball format. It only supports 256 Colors. Pixels are mapped to one of the 256 colors selected for the image.  If you want Transparency in a gif  the number of colors is reduced by 1 to 255  the 256 color now indicate no content its not real transparency it just a no color pixel in other words off or no content.
    So if you have areas that are 100% transparent there is nothing to delete the area is empty.  If you have pixels that contain some transparency and you delete those pixels you delete details are you sure you want to delete all pixels that contain transparency? You will loose things like drop shadows

  • HOW TO EDIT THIS MAP

    How do you edit this map? I want to remove the outer info and just keep the map.
    What is not seen is that this map sits in a checker board background in PS and it's a .gif file.
    What can I do??

    Hi there -
    The image you're working with is a transparent GIF. The checker pattern you're seeing when you open in it Photoshop represent the transparent pixeles in your image.
    To edit the map, you'll first need to change the color mode from Indexed Color to RGB or CMYK Color. Do this by going to Image > Mode > RGB Color.
    Now, you can take a selection tool (I'm using the Rectangular Marquee tool) and select the areas of the image you want to delete. Just drag your tool around an area of the image and hit Delete on your keyboard. Repeat this until you are happy with your result.
    If you want to have this image remain transparent, you can stop here and save it in a file type that supports transparency (such as PNG, GIF, or PSD).
    If you want to add a background, create a new layer in your Layers Panel and drag it below your map layer.
    Then, grab your Paint Bucket tool and fill the background with whatever color you want.
    There you go! Hope this helps!
    Cheers,
    Kendall

  • How to create transparent image at run-time?

    How to create transparent image at run-time? I mean I want to create a (new) transparent image1, then show other (loaded) transparent image2 to image1, then show image1 to a DC. The problem is - image1 has non-transparent background...

    i'm not sure, but you can set the alpha value to 0 in all pixels which are 'in' the background..
    greetz
    chris

  • How to edit photo text in adobe photoshop?

    how to edit photo text in adobe photoshop?

    It will depend on the image. If it was one that was saved as a psd file and has layers (window>layers) {Look in the layers panel and see if you see a layer with a thumbnail that looks like a large T} In this instance, you can double click on that thumbnail to highlight the text then type in its replacement.
    If the image is a jpg which does not support layers, transparency or live text, then that would mean that you need to use the selection tools to select that text and fill it with the same color as the background. You can then use the text tool to type in the text you want.
    Remember to save a copy as a psd file so you can edit the text at a later date.

  • How to get the pixel data so as to work on it?

    Hi all,
    I am trying to write a plug-in that will crop and scale the image, edit the selection in the image document based on image data. For this purpose I need the pixel data of the image. How to get the image data as different pixels and what is the data structure used to store this data?
    Assumption: No layers i.e., only background
    Thanks in advance,
    Sailu

    Hi Ilya,
    Thank you for your post. In the plugin architecture you propose (automation + filter), do you have an idea about how to share the pixel data between the two plugins? I have found a post that gives details about how to get pixel data and show it using ADM components
    Matthew Hollingworth, "ADM Color Managed Preview?" #1, 22 Oct 2007 11:53 pm but it supposes that you have a filter plug-in.
    Again, does anyone knows how to preview the current image in a AUTOMATION plug in? This seems impossible.
    Thank you all for your help
    Cheers,
    Chaker

  • Crop document by transparent pixels

    Hi,
    I have a question on you. I need crop document by transparent pixels.
    But I don't know, how to do it.
    Document has function crop but it need width and height.
    Do you know function with transparent pixels??
    Than you Domaneni

    Here is an example.
    app.activeDocument.trim ( TrimType.TRANSPARENT );// assumes you want to trim all edges

  • About sprite3D with fully transparent pixels

    I have a image with fully transparent pixels. want to use in a sprite3D object. But all of fully transparent pixels is rendered as white. There is no transparent at all. How can I do it or if the Sprite3D is not support transparent?
    best regards and Thanks any reply.
    The init code is :
    Image sprImg = Image.createImage("/spr.png");
    Appearance sprApp = new Appearance();
    Sprite3D spr3D = new Sprite3D(true,new Image2D(Image2D.RGBA,sprImg),sprApp);
    spr3D.setCrop(sprTexX,0,52,128);
    sprTran.setIdentity();
    sprTran.postTranslate(0.f,2.f,5.f);
    sprTran.postScale(2.f,4.f,1.f);

    Hi Sniper_bat,
    I want to do exactly the same thing, did you ever fix this problem?
    Dan

  • Why are my transparent pixels becoming opaque (grey)?

    I have PSE 6, and am using it for digital scrapbooking. Some of the elements have transparent pixels, which allows you to see the background and layers beneath the elements. For some reason, when I drag one of these elements onto a background or another element, the transparent pixels become gray, creating an ugly grey box around the element. Also, I see when the new layer is created (on the background), by dragging the element onto the background, it becomes a "frame layer". Not sure exactly what that means, but I am thinking it might have something to do with this problem.   Hopefully someone has a suggestion
    thanks

    Have a look at  #5 in the link below which describes this "feature" and how to get around it.
    http://blog.hummiesworld.com/2007/10/bugs-and-complaints-of-photoshop.html

  • How to edit signature fields in Adobe EchoSign

    In this tutorial, learn how to use digital signatures, including how to edit electronic signature fields and other input fields in Adobe EchoSign.

    It will depend on the image. If it was one that was saved as a psd file and has layers (window>layers) {Look in the layers panel and see if you see a layer with a thumbnail that looks like a large T} In this instance, you can double click on that thumbnail to highlight the text then type in its replacement.
    If the image is a jpg which does not support layers, transparency or live text, then that would mean that you need to use the selection tools to select that text and fill it with the same color as the background. You can then use the text tool to type in the text you want.
    Remember to save a copy as a psd file so you can edit the text at a later date.

  • PS CS6 Shows Transparent Pixels Over Image When Zooming Past 50%

    I'm not sure why, but Photoshop just started doing this after I converted my files to a smart object. When I try to zoom in past 50%, it displays these transparent pixel squares over the entire image. I tried rasterizing and flatting the image back, but that didn't do anything. It seems to keep doing this. Any suggestions how I can fix this?

    That sounds like a typical display driver problem.
    If you have a PC, visit the web site of the maker of your video card, seek out and download/install the latest display driver for your hardware and OS, and reboot (even if it doesn't require it).
    If you're on a Mac, you might find that manipulating the graphics processor-specific settings in your Photoshop-Preferences-Performance dialog (and in the Advanced settings) might help.  Make sure to fully Quit and restart Photoshop after making changes there.
    -Noel

  • Ctrl + click doesn't select ALL non-transparent pixels

    Hello. How can I select ALL non-transparent pixels from a layer?
    - Ctrl + click doesn't work (it seems to have a 50% tolerance - my opacity 7% and 40% pixels don't get selected);
    - The magic wand tool with 0% tolerance does work (when I click on a transparent pixel it selects ALL opacity 0% pixels around it and then I just have to inverse selection), BUT my image has a lot of holes with transparent areas and selecting them one by one would be tedious.
    Thank you.

    I think it should. if your only going by the selection outline, then the selection outline only shows the pixels that are 50% or more selected.
    In other words the pixels have varying degrees of transparency. If the selected pixel is not at least 50% opaque then the selection outline doesn't show them, but they are selected when ctrl clicking on a layer thumbnail.
    After making the selection by ctrl clicking make a new layer and fill the selection with black and then turn off the visibilty of all the other layers.
    You should get a better idea of what is happening.If you were to lock the transparency of the layer and fill with black you should get the same result.
    If you use the magic wand at 0% tolerance then your not getting a true selection of the layer transparency, but rather making the partially transparent pixels fully opaque (selected).

Maybe you are looking for