Alpha channel data with layered format plugin

I have a layered format plugin and I am trying to write the alpha channel information separately. I have set up channelPortProcs and I am attempting to read the pixel data with readPixelsProc. The issue is that even though the readPixelsProc function doesn't return any errors the rectangle that is supposed to store the rectangle that was actually read is a 0x0 rectangle. I can't seem to find why this would be or what I might be doing wrong. Here's what I have so far:
// set up the pixel buffer
int32 bufferSize = imSize.h*imSize.v;
Ptr pixelData = sPSBuffer->New( &bufferSize, bufferSize );
if (pixelData == NULL)
     *gResult = memFullErr;
     return;
// Define the source and destination rectangles
ReadChannelDesc *alphaChannel = gFormatRecord->documentInfo->alphaChannels;
PIChannelPort port = alphaChannel->port;
PSScaling scale;
scale.sourceRect = scale.destinationRect = alphaChannel->bounds;
VRect destRect = scale.sourceRect;
// Set up the descriptor for reading pixel data
VRect wroteRect = {0};
PixelMemoryDesc dest = {0};
dest.rowBits = imSize.h*alphaChannel->depth;
dest.colBits = alphaChannel->depth;
dest.depth = alphaChannel->depth;
dest.data = pixelData;
// Put the pixel data into the buffer
*gResult = gFormatRecord->channelPortProcs->readPixelsProc(port,&scale, &destRect, &dest, &wroteRect);
if(*gResult != noErr)
     return;
The alpha channel gives me the proper name, but I just can't get the data associated with it. Thanks.

I am still trying to find a solution to this.  The propChannelName is read only and the documentInfo structure is NULL when reading.  Any suggestions?

Similar Messages

  • How to set alpha channel names in a format plugin?

    I am writing a format plugin with 6 color planes for CMYK mode. I want to set the apha channel names for planes 5 and 6 to "White" and "Clear" instead of "Alpha 1" and "Alpha 2" when I read the color data from my file. How do I set the alpha channel names?
    Thanks!

    I am still trying to find a solution to this.  The propChannelName is read only and the documentInfo structure is NULL when reading.  Any suggestions?

  • How to parse string to date with defualt format?

    is there any possibilities to parse a string to date if we don't specify the format in SDF?
    In database we have different formats and we need to convert each one convert to date with common format(something like default), is there any possibilities to do in java?

    jwenting wrote:
    Tolls wrote:
    ColinAtWork wrote:
    SumantK wrote:
    In database we have different formats and we need to convert each one convert to date with common format(something like default), is there any possibilities to do in java?Why don't you store the date in the database as a DATE datatype then you can format anyway you like??Because some people seem to fear DATEs and prefer the supposed comforts of a VARCHAR2...after all, who knows what murky goings on occur with a DATE, but at least a VARCHAR2 is readable, or something like that anyway.Just because some people don't know how to work with DATE fields (which is the real reason for their "fear" doesn't mean you shouldn't use them.
    They're the appopriate solution, so use it.Often but not always true.
    For example neither MS SQL Server nor Oracle timestamp types will store the resolution capable with the Java Date type. So if one wants to maintain all of that resolution one requires either a varchar or two columns.
    And although I haven't been able to confirm it (recently at least) at one time one of the Oracle drivers had a bug that a timestamp would wipe out following columns. For that one either one was left with having only a single timestamp as the last column or using a varchar.

  • Finding special effects with alpha channel compatible with final cut studio

    does anyone know a special effect of a gun flash and explosions with alpha channel compatible with final cut pro studio? I would like to be able to buy these special effects. thanks.

    ArtBeats.com
    Depending on your needs, it's usually better to create muzzle flashes in Motion or After Effects.
    bogiesan

  • How to retrieve alpha channel data in format plugin

    I want to ask how to get the alpha channel 's data that describle the document's transparent info, in a format plugin.
    for example , when open a PNG file in Photoshop, the photoshop set FormatRecord:: planes to 3 (not 4),
    in this case i can only request the RGB data.
    then how can i get if the pixel is transparent in document ?  (that is 0 - completely transparent, 255 - completely opaque)
    Thanks~

    i have resolved this problem, it's maybe i didnot set the fmtCanWriteTransparency flag in the pipl.
    thanks.

  • Alpha channel problem with Pixel Bender blendShaders

    I'm using Pixel Blender to try and create a blend shader for a Flex 4.0 app.
    It looks like this:
    <languageVersion : 1.0;>
    kernel PixelReverse
    <   namespace : "com.abc.def.filters";
        vendor : "EdAlive";
        version : 1;
    >
        input image4 foreground;
        input image4 background;
        output pixel4 dst;
        void
        evaluatePixel()
            pixel4 fgPixel = sampleNearest(foreground, outCoord());
            pixel4 bgPixel = sampleNearest(background, outCoord());
            if((bgPixel.r == 0.0) && (bgPixel.g == 0.0) && (bgPixel.b == 0.0) && (bgPixel.a == 0.0)){
                bgPixel.r = bgPixel.g = bgPixel.b = 1.0;
            dst.r = 1.0 - abs(fgPixel.r - bgPixel.r);
            dst.g = 1.0 - abs(fgPixel.g - bgPixel.g);
            dst.b = 1.0 - abs(fgPixel.b - bgPixel.b);
            dst.a = fgPixel.a;
    It looks correct in the Pixel Bender preview window.
    When I use it in a Flex project with proper 32 bit png images, the filter seems to work correctly, except it sets any partial alpha value on the images to fully opaque (like a 1 bit alpha channel).
    Because the image preview looks correct in Pixel Bender, I'm assuming it's a problem with the bitmap data that Flex is passing to the blend shader filter.
    I tried changing the filter to simply output a copy of the foreground firstly, and the background second, to test.
    When returning a copy of the foreground, the imags weren't visible on stage, either because the pixels were transparent or because it was really returning the background pixels, camouflaging the images.
    When returning a copy of the background, the images were just black rectangles.
    The images are being place on stage programmatically inside an mx Module, and having their depth property set.
    They also have draggable behaviour, where the current drag object is layered above all else during the drag.
    I'm actually using a subclass of mx.controls.Image, but am simply setting the source property with preloaded bitmap data, so I'm am fairly sure the subclass is not a factor.
    I hope this is enough information for someone to be able to provide some help.
    Thanks

    Please make sure you have installed the latest graphics drivers, from http://www.nvidia.com/Download/index.aspx?lang=en-us, for your graphics card.

  • Alpha channel weirdness with hardware MPE

    To begin, I'm using a GTX 480 with the hack, so I'm not going to complain too loudly it this is a result of using as-yet unsupported hardware. However, I just want to verify with other hardware MPE users (both legit and unsupported) if this issue is happening on other systems.
    I've noticed some oddities with imported PSD files and the way that their alpha channels are rendered with hardware MPE, versus software MPE. I'm putting up a couple frame grabs with GPU acceleration turned on and off at couple different point where I'm using the PSDs. Forgive the PNG compression; you should be able to see the difference, nevertheless.
    First up, 100% opaque text over a background. The edges of the text are... fuzzy, maybe?
    Software:
    Hardware:
    Second, a couple layers Fast Blurring and fading in. The logo is 100% opaque, and there is a separate "glow" layer (rasterized in PS) behind it. Pretty obvious, here...
    Software:
    Hardware:
    Finally, a mostly-transparent logo bug. The hardware version is not as transparent.
    Software:
    Hardware:
    The only difference between each of these examples is that I turned on or off GPU acceleration in the Project Settings; it's the same PSD for each grab. I've also noticed that standard cross dissolves are a little chunky when dissolving to or from a graphic (even a flattened version); the opacity change is not as linear as it usually is. In software mode, this goes away.
    Anyone witnessed similar results? Again, I want to believe that this is just a result of using the GTX 480 and the hack, without official support. It could very well be the nVidia driver, too, I suppose, but I haven't tried rolling back to check that (I'm running the latest versions).
    Thoughts?

    I can confirm this.
    I do not think its the psd but the Alpha Channel in general.
    The colours are off when in MPE (Nvidia GTX 285)
    I filed a bug report.

  • Apex mobile Date-Picker (date with time) format mask error

    Hi together.
    I'm playing  a little bit with Apex mobile.
    I want to save a date with hours and minutes in the database. So i have an date field (type: date with time).
    On my phone i can select an date value with time, but when i want to save the value, i get an format error, that the format 'YYYY-MM-DD"T"HH24:MI:SS' is wrong.
    I can't change the format mask in the element properties, because it is everytime going back to the old value "YYYY-MM-DD"T"HH24:MI:SS", when i save it.

    Not a 100% related, but personally and from a usability point-of-view I really dislike the built-in datetimepicker and so far every client who has seen it has agreed with it. It pops the date and time down to the bottom, it only selects when you hit close, it just doesn't look appealing as the normal datepicker does and you expect more. Personally I've also gone the route Jari described several times, and it's probably still the cleanest and least error-prone option. Validating dates can be quite a pain, but the datepicker built-in validation does that fine, so if you can circumvent validating a free-text time field that helps). I've used some jQuery timepicker plugins aswell, and they're ok, but still don't solve the validation (even though there is some javascript validation you still need serverside validation). All I'm trying to say is that using select lists for hour-minutes is not such a bad idea in my opinion.

  • Select of date with yyyymmdd format

    HI I have a report that I want to select the current date -1.
    but our dates are in this format
    YYYYMMDD so I cant just use 'current date?

    What database are you reporting against?
    If you're using Oracle, you should consider creating a SQL Expression field with this code:
    TO_CHAR("DATE_FIELD", 'yyyymmdd')
    You can then use this field in the Record Selection formula to make sure the query generated contains a where clause. The record selection would be:
    totext(currentdate-1, "yyyyMMdd") = {%SQL_Expression_Formula}
    If you're using SQL Server, the SQL Expression formula would be:
    replace(convert(varchar, "DATE_FIELD", 111), '/','')
    -Abhilash

  • Outputted date with unusual format mask

    I am getting a flat file outputed from Fusion Financials SAAS, and one of the columns has this: 2013-11-14T15:10:36.000-06:00
    Clearly its a date. I am guessing its a datetime TIMESTAMP WITH TIME ZONE datatype. But, the Format Model is unfamiliar to me, particularly regarding the letter 'T'.
    Because its a flat file, this is coming to me as varchar2 data. I'd like to convert it to datetime.
    I got to this:
    select to_timestamp_tz('2013-11-14T15:10:36.000-06:00', 'YYYY-MM-DD HH24:MI:SS.FF TZH:TZM') AT LOCAL
    from dual
    It fails because of the letter 'T',
    I know I could do this:
    select to_timestamp_tz(REPLACE('2013-11-14T15:10:36.000-06:00','T',' '), 'YYYY-MM-DD HH24:MI:SS.FF TZH:TZM') AT LOCAL
    from dual
    And it works.
    But that is not the point. The point is to find the Format Model that Oracle is using here.
    Any thoughts on this?
    Thanks,
    Arie

    Arie, the timezone format in the file is based on ISO 8601: ISO 8601 - Wikipedia, the free encyclopedia
    This should work:
    SQL> select to_timestamp_tz('2013-11-14T15:10:36.000-06:00', 'YYYY-MM-DD"T"HH24:MI:SS.FF TZH:TZM') from dual;
    TO_TIMESTAMP_TZ('2013-11-14T15:10:36.000-06:00','YYYY-MM-DD"T"HH24:MI:SS.FF
    14-NOV-13 03.10.36.000000000 PM +06:00
    Hope this helps,
    Oliver
    Fusion Apps Developer Relations
    https://blogs.oracle.com/fadevrel

  • Loading Excel data with custom format applied

    Hi,
    I have an Excel File as source with the custom formatting applied to the data in it.
    For Eg. value 64 has special formatting applied so as to display it as 0064.
    BODS loads only the actual data as 64 and though I expect to load the formatted data(0064).
    Is this an expected behavior of BODS?
    DS Version : 14.1.2
    Thanks.

    No. If you define file format as flat file and define the field type as char then you can load all the formatted data like 0064 into DB. If you use excel then excel will remove leading zeros. This is excel functionality. or you can define the input file as CSV file and change the format of the field.
    Thanks,

  • Error While Formatting the Date with Timestamp  Format in MS WORD Template

    Hey
    I have a requirement where i need to change the date from " 2009-08-11T20:51:47.000-05:00 " to 08-AUG-2009:8:51:47 PM
    For this i SQL wrote
    CAST(DAYOFMONTH("- Protocol Product"."Date Created") AS VARCHAR(2)) || '-' || CAST(MONTHNAME("- Protocol Product"."Date Created") AS CHAR(3)) || '-' || CAST(YEAR("- Protocol Product"."Date Created") AS CHAR(4))DATE,
    "- Protocol Product"."Date Created" to get the first part i.e "08-AUG-2009" and for the second part i was just changing the date in MS Word h:mm am/pm and its not showing the correct time its showing 11-Aug-2009 1:51 AM insteas of 8:51 PM
    Is there any way to get the Format i need by using the SQL
    Any Help Appreciated
    ~Srix

    I used the following XSL and its Working !
    <?xdoxslt:xdo_format_date($_XDOXSLTCTX, "YOUR COLUMN",'DD-MMM-YYYY HH12:MI:SS AM')?>

  • Multiple channel data with different time stamp logging

    I have peaks and valleys from multiple channels with different time stamp but I am not able to log to a single file. Any idea on how to do this?
    Attachments:
    Single Point Peak Valley Log.vi ‏53 KB

    Hi Dennis,
    Sorry for that I have modified the VI.
    Because the peak and valley of every channel will occur at different time and I want to log the peak/valley with the time stamp.
    How can I log them on the same file.
    Attachments:
    Single Point Peak Valley Log_Mod.vi ‏53 KB

  • Extract layer with alpha channel or with whole layer size?

    First of all.Sorry about my English.But I'll try my best to describe what I mean.
    The text with transform:
    The extract window of text:
    Is any possible make the extract given whold layer size result ?
    What I except:

    But that's a lot of layer i need to extract
    Almost like ... 21 layers and i need another scaled level "x/2" "x/4"
    21 * 4 = 84 I must do 84 save as. thats not good.

  • Creating date with yyyyMMDDHHmmss format??

    How can i produce date so the result is in the format of "yyyyMMDDHHmmss"??
    For example 20060729180902. What is the sourcecode?

    What do u mean by SimpleDateFormat??
    Can u explain more?Im new in java....Open the API. Search for class SimpleDateFormat. Read the description and the methods.
    No point in me repeating what it says.

Maybe you are looking for

  • Mac Mini substitutes home server and apple tv?

    I have a HP mediasmart home server to manage backups, remote access and such. As well as I have an Apple TV where i store my pictures, movies, music etc. I wonder if the mac mini (+server) will be a good substitute for all that functionality? http://

  • Oracle 11gR2 install query

    I have downloaded the Oracle 11g Release 2 form the Oracle website for installation. Oracle Database 11g Release 2 (11.2.0.1.0) for Microsoft Windows (x64) win64_11gR2_database_1of2.zip (1,213,501,989 bytes) (cksum - 3906682109) win64_11gR2_database_

  • Expression Builder - Anydata Cast Error - Encountered the symbol "("

    Hello I am using OWB 11 with Oracle 11 and am hitting an error on something I would think is super simple in expression builder! So I been reading around the forums and havent been able to figure out what is going on with my transformation I drag and

  • Solaris x86 on a mac, blank screen after miniroot but NOT when console=ttya

    I am trying to install Solaris 10 x86 update7 on a Mac Mini. It hangs with a blank screen right after loading the miniroot, before the "Configuring devices..." part. I can't even see the miniroot loading completion (the hex addresses displayed when m

  • Interval year to month

    can any body tell me how to use interval year() to month data type? please...its urgent. indiana..