FileFormat: Reading transparency and color data separatley

I have a problem reading data via my file format plugin.
I can read the different layers in the format in Lab color mode (8-Bit).
In the file there is a layer transparency mask (1 byte for every pixel), which is stored right before the image data.
Currently I tried 2 approaches:
1.
- Set transparencyPlane to 3
- Set loPlane, hiPlane to 3
- Set colBytes to 1
- Set rowBytes to image width
- Set data to a buffer with size of image width
- read row from the transparency mask
-> advanceState gives error (-30500)
2.
- read transparency mask completely (I know, bad idea)
- Set transparencyPlane to 3
- Set loPlane = 0, hiPlane = 3
- Set colBytes to 4
- Set rowBytes to image width * 4
- Set data to a buffer with size of image width * 4
- read row from file in a temp. buffer
- copy values from temp. buffer and transparency for every pixel to the data buffer
-> advanceState ok but image ks not correct in PS
I think there must be another, better way to apply this transparency mask.
Thank you for your help....

Problem solved.
I forgot to tell PS the correct count of planes in the readStart selector.
So approach 1 was right.

Similar Messages

  • Problem with adjusting both transparency and color of an object

    I am writing a program where when an object is picked, both it's transparency and color will be altered (the object will become opaque, and its color will turn to a predefined "selected" color), while the previously selected object will return to its original transparency and color. I am able to get this to work, except that objects that were picked two or more picks ago will remain in the selected color, albeit in their original transparency. This problem only seems to occur when transparency is factored in. The picking/color & transparency altering code is as follows.
    public class PickingListener extends MouseAdapter {
         private PickCanvas pickCanvas;
         private TextDisplay overlay;
         private Primitive p;
         private Primitive lastP;
         private ColoringAttributes origColor;
         private TransparencyAttributes origTransparency;
         public PickingListener(PickCanvas pickCanvasArg, TextDisplay overlayArg) {
              pickCanvas = pickCanvasArg;
              overlay = overlayArg;
         public void mouseClicked(MouseEvent e) {
              pickCanvas.setShapeLocation(e);
              PickResult result = pickCanvas.pickClosest();
              if (result == null) {
                   System.out.println("Nothing picked");
              } else {
                   p = (Primitive) result.getNode(PickResult.PRIMITIVE);
                   if (p != null) {
                        setSelectedColor();
                        overlay.setPickedBarInfo((BarInformation) p.getUserData());
                   else
                        System.out.println("null");
         private void setSelectedColor() {
              ColoringAttributes barCA = new ColoringAttributes();
              TransparencyAttributes barTransp = new TransparencyAttributes(TransparencyAttributes.NICEST, 0.0f);
              barCA.setColor(ColorConstants.SELECTED);
              if (lastP != null) {
                   lastP.getAppearance().setColoringAttributes(origColor);
                   lastP.getAppearance().setTransparencyAttributes(origTransparency);
              origColor = p.getAppearance().getColoringAttributes();
              origTransparency = p.getAppearance().getTransparencyAttributes();
              p.getAppearance().setColoringAttributes(barCA);
              p.getAppearance().setTransparencyAttributes(barTransp);
              lastP = p;
    }Capabilities to alter the primitive's color and transparency are all set.
         barAppearance.setCapability(Appearance.ALLOW_COLORING_ATTRIBUTES_READ);
              barAppearance.setCapability(Appearance.ALLOW_COLORING_ATTRIBUTES_WRITE);
              barAppearance.setCapability(Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_WRITE);          barAppearance.setCapability(Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_READ);
    ColoringAttributes barCA = new ColoringAttributes();
    barCA.setCapability(ColoringAttributes.ALLOW_COLOR_WRITE);
    barCA.setCapability(ColoringAttributes.ALLOW_COLOR_READ);)
    Any insight as to why this would occur would be greatly appreciated.
    -Adrian Benton

    A Behavior is the preferred way to make changes in a scenegraph. Here is an example from a previous post that changes the appearance of a shape when it collides with another shape.
    The javadoc for javax.media.j3d.Behavior appears to refer to the issue you have.
    Transparencies are confusing, different display adapters deal with them differently. Suggest you search the forum at
    http://forums.java.net/jive/forum.jspa?forumID=70
    for more detailed information.
    regards
    class CollisionDetector extends Behavior {
      private static final Color3f highlightColor = new Color3f(0.0f, 1.0f, 0.0f);
      private static final ColoringAttributes highlight = new ColoringAttributes(
          highlightColor, ColoringAttributes.SHADE_GOURAUD);
      private boolean inCollision = false;
      private Shape3D shape;
      private ColoringAttributes shapeColoring;
      private Appearance shapeAppearance;
      private WakeupOnCollisionEntry wEnter;
      private WakeupOnCollisionExit wExit;
      public CollisionDetector(Shape3D s) {
        shape = s;
        shapeAppearance = shape.getAppearance();
        shapeColoring = shapeAppearance.getColoringAttributes();
        inCollision = false;
      public void initialize() {
        wEnter = new WakeupOnCollisionEntry(shape);
        wExit = new WakeupOnCollisionExit(shape);
        wakeupOn(wEnter);
      public void processStimulus(Enumeration criteria) {
        inCollision = !inCollision;
        if (inCollision) {
          shapeAppearance.setColoringAttributes(highlight);
          wakeupOn(wExit);
        } else {
          shapeAppearance.setColoringAttributes(shapeColoring);
          wakeupOn(wEnter);
    }

  • Process Chain : Read PSA and Update Data Target in BI 7.0

    Hello Experts,
    In my Process Chain I have a variant Execute Infopackage to load the data only into PSA. then I have next variant as *Read PSA and Update Data Target*. my data target was a Master Data table Hierarchy
    In the variant " Read PSA and Update Data Target". the selection Parameters were
    PSA.Table : 0GLACCEXT_T011_HIER_BA1
    Selection Object Type : same Infopackage in Varaint Execute Infopackage
    the Error message was Variant doesnot contain a valid combination request/data target
    I checked the PSA-Table using RSA1OLD Transaction then I find four PSA Tables:
    0GLACCEXT_T011_HIER_BA1
    0GLACCEXT_T011_HIER_BA2
    0GLACCEXT_T011_HIER_BA3
    0GLACCEXT_T011_HIER_BA4
    All the requests are linked to PSA Table *0GLACCEXT_T011_HIER_BA4*.
    I can't understand why there exists four PSA Tables?
    I try to link the PSA-table 0GLACCEXT_T011_HIER_BA4 in the variant *Read PSA and Update Data Target and try to save it it raises short dump.
    If I select 0GLACCEXT_T011_HIER_BA1 in the varaint I shouldn't face any problems.?
    but the process chain raises an Error message Variant doesnot contain a valid combination request/data target with this variant.
    How shall I handle this issue?
    Please carify me the issues as soon as possible.
    thanks in advance
    Regards
    sailekha

    Hello,
    In the Variant Read PSA and Update Data Target I have to select  the PSA Tabelle Name from the preselection list in the System it shows me all the four PSA Tables that I mentioned.
    I can select any one of them. So I trieed with all the four PSA Tables in the list but I can selct only the XXXX......BA1 table  then only I can save and  include it in the PC. If I select the remaining tables BA2, BA3, BA4.........while I try to save the Variant it raises short dump.
    I checked the PSA using the Transaction  RSA1OLD under PSA...... I find 4 PSA Tables( I don't know whether they are PSA Tables or not but in the Variant it states that they are PSA Tables) in which all the requests are attached to BA4. only.
    I observed that ony for Hierarchies I find four PSA tables for remaining one only one PSA table was available.
    I totally confused how to handle this situation. any suggestions......... please help me to resolve this problem.
    Thanks & Regards

  • Transparency and color blend space: fail!

    Hi there. I keep trying to export my pdf, to no avail.
    I get an error that pops up that says there is an error with my transparency and color blend space.
    HOWEVER, all my images are set to CMYK (it says so in the links panel) and my transparency blend space is also set to CMYK. I have no errors in my preflight panel. When I ignore the message and continue to export, the image looks completely different and not the way I want it to show up.
    Please let me know how I can fix this error! Thanks so much!

    Document CMYK is the assigned profile in Edit>Assign Profiles.... Working CMYK is Color Settings...>Working Spaces>CMYK. If there's no profile assigned, document and working are the same. So in this case Document CMYK is Coated FOGRA27 and Working CMYK is US Web Coated SWOP—the assigned FOGRA is color managing the document's native CMYK colors not the working US SWOP

  • What is the best software programs that I can use to read, write and modify data / files on external HD (NTFS format i.e.  Windows) ?

    Hi guys,
    I’m new to Mac and have a MacBook Pro Lion OS (10.6.8 I think !!!) with Parallels 7 (Windows 7) installed. Can someone please tell me what is the best software program that I can use to read, write and modify data / files on external HD (NTFS format) from the Mac OS ? I heard of Paragon and Tuxera NTFS. Are they free ? Are they good ? Are there any other software programs out there ? I heard that some people have issues with Paragon.
    Thanks.

    Your best bet would be to take the drive to the oldest/compatible with that drive Windows PC and grab the files off, right click and format it exFAT (XP users can download exFAT from Microsoft) and then put the files back on.
    Mac's can read and write all Windows files formats except write to NTFS (and in some cases not read) so if you can change the format of the drive to exFAT (all data has to be remove first) then you will have a drive that doesn't require paid third party NTFS software (a license fee goes to Microsoft) for updates.
    Also it's one less hassle to deal with too.
    .Drives, partitions, formatting w/Mac's + PC's

  • BW 3.5 - Update to PSA only / Read PSA and Update Data Target

    Hi Folks,
    I am planning to use on a  BW 3.5 data source and infopackage that loads to PSA only (as the source system job runs quite long and we would run other prepration loads in parallel before pushed to final cube). And then later in the process chain the process Read PSA and Update Data Target to load the data to final cube.
    As we plan to run the process chain 3 times a day I was wondering if the Read PSA and Update Data Target always takes only the latest request loaded to the PSA (as it is always the same infopackage) or do we have to delete the PSA request at the end of each process chain run so that not the next run will load the PSA request again as it is still in the PSA?
    Thanks for all replies in advance,
    Axel

    You are loading the Delta till the PSA, multiple times a day, and after each update to the PSA you will send the data to the Cube.
    Once its there in the PSA, you are performing further tasks & then updating the cube multiple times (once after each delta)
    Well, the 1st load to the cube should be OK.
    But, from the next load onwards, it would pick up all the requests from the PSA & you will have wrong values in the Cube.
    Because, i think, while using 'Read PSA & Update the Target', you can't set it for a FULL or a DELTA load.
    It will bring in everything that exists in the PSA.
    I would advice you to clean the PSA before the starting next Delta.
    But, there is a counter argument.
    If the data mart sign is reflected in the PSA for the request that has been loaded into the cube, then the next time the system will pick up the request which does not have a data mart symbol.
    You can always give this a try in your Dev system.
    Edited by: Vishal Sanghvi on Apr 1, 2011 1:58 PM

  • Reading file and dump data into database using BPEL process

    I have to read CSV files and insert data into database.. To achieve this, I have created asynchronous bpel process. Added Filed Adapter and associated it with Receive activity.. Added DB adapter and associated with Invoke activity. Total two receive activity are available in  process, when tried to Test through EM, only first receive activity is completed, and waiting on second receive activity. Please suggest how to proceed with..
    Thanks, Manoj.

    Deepak, thank for your reply.. As per your suggestion I created BPEL composite with
    template "Define Service Later". I followed below steps, please correct me if I am wrong/missing anything. Your help is highly appreciated...
    Step 1-
    Created File adapter and corresponding Receive Activity (checkbox create instance is checked) with input variable.
    Step 2 - Then in composite.xml, dragged the
    web service under "Exposed Services" and linked the web service with Bpel process.
    Step 3 - Opened .bpel file and added the DB adapter with corresponding Invoke activity, created input variable. Web service is created of Type "Service" with existing WSDL(first option aginst WSDL URL).
    and added Assign activity between receive and invoke activities.
    Deployed the composite to server, when triedTest it
    manually through EM, it is promting for input like "subElmArray Size", then I entered value as 1 with corresponding values for two elements and click on Test We Service button.. Ptocess is completing in error. The error is
    Error Message:
    Fault ID
    service:80020
    Fault Time
    Sep 20, 2013 11:09:49 AM
    Non Recoverable System Fault :
    Correlation definition not registered. The correlation set definition for operation Read, process default/FileUpload18!1.0*soa_3feb622a-f47e-4a53-8051-855f0bf93715/FileUpload18, is not registered with the server. The correlation set was not defined in the process. Redeploy the process to the containe

  • Need help with transparency and color quality in the forground

    I need to make an image that is comprised of a collage in the back with a clear visible logo on top. I'm not sure if I'll need to change the hue's of the background collage images to create the image or if theres a way to make the image somewhat see through but keep true to the colors of the forground?

    I agree with Trevor. I think you are over thinking the issue. Just place a logo in the same document, scale it, adjust its opacity if necessary and your done. As for the background of the logo, that can depend on how it was created. Preferable in photoshop so that you have a transparent background. But if the background happens to be pure white or black, you can use blend modes to remove the background.
    But I am getting ahead of my self. Lets see how you do, post your results, if necessary a screen capture of photoshop with the layers panel open.

  • Read PDF and pull data

    Hi,
    I have a requirement to upload PDF from local drive and search for particular line and move that particular line data into a internal table in a readable format.
    Example:-->
    I have pdf file ZTEST.pdf within the file on 10th line, we have external customer number in a specific length. I need to read this external customer number and update into a custom table.
    Can anybody give a possible solution.
    Thanks for your help
    aRs

    Convert the pdf to txt file by some system calls , then
    upload it by CL_GUI_FRONTEND_SERVICES ,
    Never tried it though..

  • Reading Incumbent and Position data in SuccessionPlanning

    Hi All:
    I'm wondering if anyone else has experienced an issue with the SuccessionPlanning module where the organizational hierarchy can be viewed, and the position/holder names are displayed in the hierarchy view.  However, when clicking on the position/holder for more information, the view details pane that comes up is unable to display little to no information about the holder or the position.
    So, for instance, if I were to click on the Position box for the Janitor position which was held by John Doe, the pane that opens up for more details the position and the incumbent lists his name as "n/a  n/a".
    I likely have a broader issue, because my searches for all positions and all talents yield no results and the log file tells me the dataset brought back no results which just isn't possibe, but I'm a little stumped because I HAVE actually connected to SAP with my connection string and am able to retrieve some data.  For instance,  I can see that the position Janitor is connected to job Custodial Enginner, which reflects ECC.  However, if I go to change the job the position is tied to directly in Nakisa, I can't get any jobs to show up in the dropdown for jobs. 
    The ID I'm using in my connection string is able to retrieve all this data if I were to log directly into ECC.
    Anyway, that's kind of a lot of info and I see most of the questions on here are about the OrgChart module, but since I'm a little stumped, I thought I'd give it a shot.  If anyone has come across this issue before, I welcome any feedback you can offer.  I'm using TVN 2.0 on ECC 6.0 ehp4.
    Thanks,
    Chris

    Chris,
    I would strongly recommend installing Service Pack 1 (SP1) for SAP TVN 2.0 before you do anything more (especially if you haven't done any customisations yet).  There is some very significant fixes in there.
    You will find this on service.sap.com/support then follow:
      SAP Support Packages ->
      Support Packages and Patches - Entry by Application Group ->
      SAP Solution Extensions by Partners ->
      SAP Talent Visualization by Nakisa -> .... sure you can follow the rest from there.
    There is a zip file with code and a PDF install guide in.  Just follow the steps, it will take you 1-2 hrs I guess.
    Hope that helps.
    Stephen
    [ROC|http://www.roc-group.com]

  • Best way to read KEKO and KEPH data

    Hi All,
    I have to collect data from KEKO and KEPH.
    I tried FM 'CK_F_KEKO_KEPH_READING'. but it takes a long time. Is there any better way to read that data. I have to collect data for multiple materials and multiple plants.
    Thanks in advance..!

    Try
    <b>CK_F_KEKO_KEPH_DIRECT_READ
    CK_F_KEKO_KEPH_READING
    CK_F_KEKO_KEPH_DIRECT_READ</b>
    <u><b>also look at Function Group = "CK2U"</b></u>
    Hope this’ll give you idea!!
    <b>Pl... award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

  • PDF Background Transparency and Color

    I have several PDF pages that are vector black line-drawings that have been placed into a document as a gallery, which works great.
    However, when you click on the PDF to view it in isolation, the background turns black and the drawing is hardly visable.
    I am able to convert the PDF's to a raster format, but would like to know if there is a way to change the background color when viewing an image in isolation.
    Thank you in advance,

    I just realized that converting the PDF's to a raster format is not a preferable option, as the sepia background of the picture frame fill is preferred.
    Can the background of the image isolation mode be changed (to match the sepia background of the picture frame fill)?

  • Transparency and color falloff with depth effect?

    Videocopilot's 3D Falloff effect isn't compatible beyond CS4. How would I create this effect in CS5 or above?
    http://www.videocopilot.net/tutorials/3d_falloff/

    It's an easy expression involving distance calculation with length(point A, point B) and then feeding the result into a linear() on whatever property you need it, in this case obviously camera distance tied to a DOF filter or whatever... So in this case it would look like
    camPos=thisComp.layeer("Camera").transform.position;
    layPos=thisComp.layeer("XYZ").transform.position;
    camDist=length(camPos,layPos);
    linear(camDist(minDist,maxDist,minBlur,maxBlur)
    Just fill in values for the min/max stuff...
    Mylenium

  • Reading file from ftp server and importing data into table

    Hi experts,
    Well basically i have text files with different layout that have been uploaded on an ftp server. Now i have to write a procedure to fetch those files, read them and insert data in a table... can that be done?
    your precious help would be greatly helpful.
    Thanks

    declare
    file1 UTL_FILE.FILE_TYPE;
    filename varchar2(1000) := 'GTECHFILES';
    str long;
    begin
    file1 := UTL_FILE.FOPEN (filename,'agent_dump_csv.rep','r',32767);
    loop
    UTL_FILE.GET_LINE ( file1, str );
    --dbms_output.put_line('Value is :'||to_char(str));
    end loop;
    UTL_FILE.FCLOSE( file1 );
    exception
    when no_data_found then
    dbms_output.put_line('END OF FILE');
    UTL_FILE.FCLOSE( file1 ) ;
    when others then
    UTL_FILE.FCLOSE( file1 ) ;
    dbms_output.put_line('ERROR: '||sqlcode||':'||sqlerrm) ;
    end;
    i have managed to write this piece of code and all lines are being read and now i need to insert data into my table and the fields are seperated by a `|` i am strill trying to figure how to do that now. help ...
    Edited by: Kevin CK on 17-Jan-2010 22:40

  • Read and Get Data from PDF

    Hi All,
    I am fairly new to programming macros in Excel VBA, and right now I need to write a macro that can open a PDF file and read it and get data from there and paste it into an excel spread sheet. Is this possible?  If so can you give me some sample code
    that would do that?

    I did this once many years ago.  I had to have Acrobat Professional installed ($$$).  There are free pdf parsers that you access from VBA using Win32 commands like:
    https://code.google.com/p/peepdf/
    Maybe something has changed since I did it

Maybe you are looking for

  • With a 2007 macbook, do I use a mini-DVI to DVI for Epson LCD projector?

    Just want to make sure I buy the correct adapter.  I want to Power Point over my 2007 black MacBook using the Epson 3LCD projector, and I'm not sure if I need mini-DVI to DVI to VGA, or mini-DVI to VGA.  The projector has the blue 16 pin cable, no US

  • Why aren't my iCloud and iTunes syncing?

    I think that these two issues are related, which is why I'm just posting this all together. iCloud issues - I recently purchased more space for my iCloud.  It's backing up on a regular basis, but it doesn't affect/synch with my computer.  If I add a

  • Help needed to resolve there is no attribute X errors..

    On my website http://www.dorffdesign.nl/ there is a problem. Ive put the FB Like button there and it worked fine for a while. But now its gone. So ive run http://validator.w3.org/ on it and came up with the next errors: ==============================

  • Auto-start movies in Keynote -- help!!

    I have a short (:21) QT movie in my Keynote project; twice now I've gone into the Apple store for help getting the movie to self-start; both times I have come home, been able to get the movie to then self-start twice; it then reverts to not auto-star

  • Not able to start OC4J

    Hi All, I have installed infra on linux box. I am not able to start the OC4J instance using "opmnctl startproc ias-component=OC4J" Only OID and HTTP_Server are alive in opmnctl status. But I am not able to login to OID/Oracle Directory Manager as its