How can I dispaly alpha Channels to proxy and show transparency correctly?

Hi all! I have a problem. Please help me. Thank you very much.
I want to display alpha Channels to proxy and show transparency correctly. I have get the datas of alpha Channels and RGB color. Following are the codes:
void HiddenData::PaintPreview()
if( !channelData ) return;
PSPixelMap pixels;
int spotChannelCount = gFilterRecord->documentInfo->alphaChannelCount;
pixels.version       = ( spotChannelCount > 0 ) ? 2 : 1;
pixels.bounds.left   = proxyRect.left;
pixels.bounds.right  = proxyRect.right;
pixels.bounds.top    = proxyRect.top;
pixels.bounds.bottom = proxyRect.bottom;
int32 proxyWidth  = proxyRect.right - proxyRect.left;
int32 proxyHeight = proxyRect.bottom - proxyRect.top;
pixels.imageMode     = gFilterRecord->documentInfo->imageMode;
pixels.rowBytes      = proxyWidth * gFilterRecord->documentInfo->depth / 8;
pixels.colBytes   = 1;
pixels.planeBytes    = proxyWidth * proxyHeight;
pixels.baseAddr   = channelData;
// new for version 2 of PSPixelMap
PSPixelOverlay* overlay = NULL;
if( spotChannelCount > 0 ){
  overlay = new PSPixelOverlay[ spotChannelCount ];
  if( overlay ){
   int j = 0;
   for( int i = 0; i < spotChannelCount; i++ ){
    overlay[i].data = channelData + pixels.planeBytes * (4 + i);
    overlay[i].rowBytes = pixels.rowBytes;
    overlay[i].colBytes = 1;
    overlay[i].r = (unsigned8)spotColorList[j++];
    overlay[i].g = (unsigned8)spotColorList[j++];
    overlay[i].b = (unsigned8)spotColorList[j++];
    overlay[i].opacity = 50 * 2.55;
    overlay[i].overlayAlgorithm = kStandardAlphaOverlay;
    overlay[i].next = ( i == (spotChannelCount - 1)) ? NULL : overlay + i + 1;
   pixels.pixelOverlays = overlay;
   pixels.colorManagementOptions = kViewAsStandardRGB/*kViewAsMask*/;
pixels.mat = NULL;
pixels.masks = NULL;
pixels.maskPhaseRow = 0;
pixels.maskPhaseCol = 0;
(gFilterRecord->displayPixels)(&pixels, &pixels.bounds, 0, 0, (void *)hdc);
delete[] overlay;
But there is a problem.The image of alpha Channels in proxy is not clear, because overlay[i].opacity = 50 * 2.55.
It looks like  diffrent from displaying in photoshop.I do not know how to use pixels.mat and pixels.masks.
Thanks!

I run the plugin. But It can not show alpha channels. Can you show the code in your example clearly.Thanks! Following are the frames.
The original document:                                 
The result:
Can not show the alpha channels.

Similar Messages

  • How can I dynamicall​y read a file and show/plot the data in the GUI?

    Hi, everyone,
    I hope to implement a VI with the following function:
    Usually, when we "read a file" in VI and then show the data in the Waveform Chart or other display GUI, the VI will first read and record all of the data from the file and then show them simultaneously. Now, I want to implement a VI, which could read  the data from a file and display it in a time series. That is, I can define a "sampling rate" or "reading rate", like 100 data points / second,  then the data points could be correspondingly shown in Waveform Chart one by one as the time moves on. The key purpose is to simulate a real-time data collection module using an existing file.
    I don't know how to implement this function. Any suggestion and solution are really appreciated.
    Thanks.
    Zhanpeng

    Heres the same effect, just a different approach :
    The code in the red box was used to create data that you would be getting from a file.
    What you could do is (shown above) :
    - Read all of the data
    - Index only one value at a time, and set the 'sampling rate' using a wait in a while loop.
    - Build an array using this value, which will simulate collecting data in real time.
    - I used an array of the iterations as X-values, because they coincidentally correspond to # seconds in my example
    - I then bundled the time array (xvalues) with the values from your file (yvalues)
    - Send that bundle to an XY graph
    That should work, though you could implement some different logic for different sampling rates.
    Let me know if you need a hand with that.
    Message Edited by Cory K on 02-26-2009 11:36 AM
    Cory K
    Attachments:
    graph from file.PNG ‏10 KB

  • How can I export photos from my Iphone and show the filming time

    I tried to export my photos from my iphone, but the times of them are created time and modified time, how can they show the filming time?

    I tried to export my photos from my iphone, but the times of them are created time and modified time, how can they show the filming time?
    How are you trying to view the times of the photos? On a Mac you cannot see the capture date of a photo in the or video in the Finder.  The Finder will always show the date the file was created or modified, and not when the photo has been taken. The capture date, when the iPhone took the photo will be encoded in the EXIF tags of the file, and that is different from the file creation. Photo software will show you the EXIF, the Info panel in iPhoto, or the Info panel in Preview.

  • How can I read two channels with fieldpoint and labview

    I'm trying to read two or more channels with the TC 120, and I follow the examples of sopport page, but doesn't work.
    What can I do?

    For more information about reading or writing to or from multiple channels in Fieldpoint, please refer to:
    How Do I Read or Write to Multiple Channels on a Fieldpoint Module in LabVIEW?
    This should enable you to read multiple channels. The only other option available is to use one fp open.vi, multiple Create Tag.vi's and multiple FP Tag Read.vi's.

  • .png animation files... how to import keeping alpha channel please!

    My graphics man has buit me a animation on white swirly things on his system
    and given me them as sequential files.
    On gfx without alpha I open then in quicktime, open a sequential files then export to dv.
    Now of course dv will not keep alpha channels so any help on how to take this animation alpha .png and get it into my fcp time line would be much appreciated,
    regards
    daz

    Apple Animation is a high quality video codec that can support an alpha channel.
    While there are other formats that also support alpha channel, Apple Animation is the codec of choice on the Mac because it lets us transfer files between different software packages without any hassle.
    For instance, you could export a 3D scene from Maya, manipulate it further in After Effects then drop it into the FCP Timeline, all without converting it to something else at each stage.

  • How does DIADEM import TDMS files? How gets every channel his number and groupindex? How can I determine which channel has which groupindex and number?

    I store different channels in a TDMS file.
    I like to have a time channel at the first position with group index 1 and number 1.
    When I read the TDMS file with DIADEM the time channel (Float64) is on a differernt position, and the channels are not sorted alphabetically.
    Here are my questions:
    How does DIADEM import TDMS files?
    How gets every channel his number and groupindex?
    How can I determine which channel has which groupindex and number?
    Best regards
    Joerg

    Hi Jörg,
    i suppose that you´re programme whose create the *.tdms file is writing on false position. Try to create datas with timechannel on first indes in diadem, then save it and then open it again. you see that all is correct. So please tell me what programm in what version do you use and please attache it here.
    Did you use the library for creating *.tdms files like in the link ?
    http://zone.ni.com/devzone/cda/tut/p/id/6471
    Here you find the gtdms_8.x.zip - when you extract it and opened the *.llb you find vi´s for all functions e.g. writing 2d array of strings to *.tdms file
    when you open the subvi´s then you see how created and writing datas/structure to *.tdms files. Because *.tdms is binary you can´t see structure with open it in editor.
    When you don´t have Labview you can use the 30 days test of current version 8.5 under following link
    german version download link
    https://lumen.ni.com/nicif/d/lveval/content.xhtml
    english version download link
    https://lumen.ni.com/nicif/us/lveval/content.xhtml
    Hope it helps
    Best Regards

  • How can One sender communication channel pick two file from two location

    Hello
    I have a requirement that how can One sender communication channel pick two file from two location.Both the file has same name...How to configure the one receiver communication channel.i dont have any IR,no mapping..Please help me...

    >
    Soumitra Sinha wrote:
    > Hello Vijay
    > I already done the adapter specific message attribute.i am getting the file name properly.but that is nothing to do with my req.i am again clearing my problem:
    > i have two folder   folder a,folder b.Both has the same file credit0002. i have two destination folder i have one sender and one receiver channel.I dont have any IR.How one sender channel can  pick file from two location and how one receiver channel can put in two location.please help me..
    Ok now I get your requirement.
    you cant achieve this -  how one receiver channel can put in two location if you dont have a dynamic configuration defined i.e Adapter specific attributes.
    easy way - involve IR mapping
    else
    have a adapter module to define your dynamic configuration.
    Ref: /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules & /people/michal.krawczyk2/blog/2006/10/09/xi-dynamic-configuration-in-adapter-modules--one-step-further
    Set the dynamic directory/file name etc for your receiver adapter.

  • How can I Import 2 channel audio from a Sony PMW300 camera?

    How can I Import 2 channel audio from a Sony PMW300 camera?

    Terry Woolf
    Thanks for the reply.
    The link to your prior thread is
    Audio
    I suspect that the issue of no audio for your .mp4 file goes to your conversion method MXF to .mp4.
    Please excuse if I am saying what you already know. When you import your video into Premiere Elements (in your case 12 Mac), a project
    preset is established, either by you manually or the project automatically. That project preset contains a description of the project settings
    for audio as well as video. Unless you select one of the project presets which are described for use with 5.1 channel, your audio in video audio
    imports into a stereo project. It is in the export area that you will find your opportunity to customize (if necessary) the settings for audio.
    In the project, if applicable to your situation, you can duplicate an audio channel (See Fill Left or Fill Right under fx Effects/Audio Effects).
    Please let me ask this to make sure of the details.
    If you import your .mp4 with 2 channel audio (derived from your .mxf convert and dragged to Video Track 1/Audio Track 1) and cannot hear the sound....
    a. do you see any evidence for an audio file in the Timeline Audio track 1?
    b. if you do, how many wave forms do you see, one or two?
    c. if you have the audio meters opened while you are playing back the Timeline content in Edit area, do you see 1 or 2 channels and is
    there activity in both.
    d. when you import the file into Project Assets, do you observe any conforming activity going on in progress bar in the lower right cover of the workspace...if
    so, do you wait for it to go to completion before continuing on?
    We could also try deleting the conformed audio in the Media Cache Files Folder to force the program to re-conform the audio. See Edit Menu/Preferences/Scratch Disks should show you the location of the Media Cache Files Folder whose contents you will be deleting.
    Please review and consider, and then let me know if I targeted your question. If not, please do not hesitate to let me know, and I will rethink my reply based
    on your response.
    Thank you.
    ATR

  • How can i dispaly an Error Message from Server Side To form

    Hi All,
    How can i dispaly an Error Message from Server Side To form side .
    i try several ways nothing succed.
    i put the error in stack and after call the procedure from form i added
    Qms$Trans_Errors.Display_Messages;
    and because it is an error not informantional error the error screen displayed and enter
    in infinite loop acts like flashing .
    can any one help me please i use C/S Headstart6i and Designer 6i
    thanks alot
    radi

    hi,
    thanks alot lauri.
    yr code work only using information message but in error message its still the same .
    the error window still flash and enter in infinite loop of executeing the same triggers.
    thanks again
    radi

  • How to use multiple alpha channels

    Hi there. I'm using Cinema4D for some 3D animation. I'm using an object buffer compositing tag to isolate certain elements in my scene. (C4D can create an alpha channel for each object). This is then rendered out as a multi-layered PSD sequence. However C4D puts the extra channel info (z-depth, object ID, etc) into alpha channels. But AFAIK, AE only reads the first alpha channel.
    Is there a way to read extra alpha channels?

    This topic came up about two years ago, you might try searching the forum.
    IIRC, the conversation was enlightening for several of us old timers who had never even heard of multiple alphas.
    Closest I've ever gotten was using the four separate color channels to hold unrelated grayscale movies. Each was used to drive a different 3d parameter of Card Dance.
    bogiesan

  • How can one change the channel of a screen control within Mainstage?

    The issue that I'm having is that some 3rd party apps (Dimension Pro in particular) seem to receive Sustain (64) messages on only Midi Channel 1
    I'm using a multi zone controller, with sounds set in MainStage to respond to different channels. I've got it all working well except . . Dimension Pro won't "see" a controller message if it's sent from any channel other than channel 1.
    I was even having the same problem with certain sounds in Kontakt.
    So the question is . . how can one shift the channel of these messages over to channel 1?
    Better question, how can I get Dimension Pro to respond to a controller on a channel other than 1, but I suspect this is not the forum for such questions!
    Thanks in advance,
    Mark
    MacOS 10.7.3
    MainStage 2.1.3
    Axiom 61 (2nd gen) keyboard controller

    You may be able to achieve the desired results by a different method. I have an Axiom, but I don't assign zones in it. I just send one zone to Mainstage and handle it all there. You can layer and or split a practically unlimited number of instruments and assign screen controls easily. You probably want to set up all screen controls at the concert level in layout mode. You can later override concert mapping in individaul patches if you want. For instance, you could use an expression pedal for volume(7) on one patch and for modulation(1) on another patch. You can send that control to one instument channel strip or you can choose to send to all. To do this, select a screen control in edit mode. In the screen control inspector, check the overide concert mapping box. You will then see two additional tabs-mappings and unmapped. Select the mappings tab. In the mapping list, double-click "Unmapped". You can the map the screen control to any single  instrument channel strip in this list or send to all. Select one and then choose a mapping destination. If you want to map expression to one instrument and not others there's another way. Select an instrument channel strip, then selct MIDI input in the software channel strip inspector. Check the filter expression box. This instument will now not respond to expression, but the other intruments in this patch will. You can filter some other events on this page. The layer editor tab allows you full control ol splits and layering options of all your instruments in this patch. Hope this helps.

  • How can I guet 16 channels of my fire studio tube

    how can I guet 16 channels of my fire studio tube, cause im guetting just the first one.

    how can I guet 16 channels of my fire studio tube using logic pro 9?

  • I had renamed my user login name and assumed that there will be no change in the settings and files. When I login with the new profile name everything is gone. How can I get back all my files and settings?

    I had renamed my user login name and assumed that there will be no change in the settings and files. When I login with the new profile name everything is gone. How can I get back all my files and settings? Please help. Thanks.

    You should have asked this before you tried: Changing username or short name- User Account and Short Name- OS X- How to change user account name or home directory name.

  • How can i create link between ipad(xcode) and webserver?

    Hi, I'm a new to iPad development and i need help,
    i'm not good with english but i try to explain my question:
    how can i create link between ipad(xcode) and webserver?
    (the webserver ".NET" with driver odbc is connected with DB Oracle)
    so, how can my ipad application access to the Oracle DB?
    Create a webservice (.NET) to be place between iPad and DB, is this correct?
    how can i do it?
    which are libraries to include in the xcode's framework?
    thx

    I think the following URL will be your best answer:
    http://stackoverflow.com/questions/3510468/connecting-iphone-to-an-odbc-database

  • When I upgraded from v4 to v5 my bookmarks was lost. I do have the one that is in the firefox toolbar. Apparently I had a bookmarks add-on. V5 changed my browser how can I determine what the program was and if the bookmarks are still there?

    When I upgraded from v4 to v5 my bookmarks was lost. I do have the one that is in the firefox toolbar. Apparently I had a bookmarks add-on. V5 changed my browser how can I determine what the program was and if the bookmarks are still there?

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Websites remembering you and automatically log you in is stored in a cookie.
    *Create an allow Cookie Exception to keep such a cookie, especially for secure websites and if cookies expire when Firefox is closed.
    *Tools > Options > Privacy > Cookies: Exceptions
    In case you are using "Clear history when Firefox closes":
    *do not clear Cookies
    *do not clear Site Preferences
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.
    Clearing cookies will remove all specified (selected) cookies including cookies that have an allow exception and cookies from plugins.

Maybe you are looking for

  • Windows 7 pro x64 and palm centro

     I'm running windows 7 pro X64 and the software installed just fine, but not the driver.  Does Palm have any plans for a solution?  Are there any third party drivers that will solve my problem without having to install a bluetooth device on my pc?  

  • How can I set up 3 different VLANs on Cisco 5508

    Dear  Community Members,   I have a need to setup three (3) VLANs with different SSID's for students , staff and visitors in a  College. The controller is Cisco 5508  with Cisco 3502E-E-K9 AP presently the wireless  network is flat with just one VLAN

  • Extending networks

    HI I'm switching over from an Airport Express to an Airport Extreme so I can extend our wireless network at home. I have the Extreme configured so I can connect to the internet, but can't seem to get the express configured to extend it. I've followed

  • Re: Qosmio G - Hidden files and folders not showing

    Hi folks, I have some hidden files and folders, which I was able to access before, and I used to click on the 'organise tab', view, Advanced Settings, show hidden files and folders, in order to hide or show the files. Unfortunately there seems to be

  • Hiding lines in a query while using the overall results

    Hi all, We got a hierarchy with 4 levels. Each element of the first level after the root "L1" (2nd level in real) receive amounts called "INITIAL". The next step is to send and dispatch these amounts to the 3rd level "L2". At this point, the L2s can