How to set photometricInterpretation property while storing TIFF using JAI?

I am converting JPG Grey Sale image in to bilevel image and saving in TIFF format with Group IV compression.
When I view the output TIFF, some applications displaying it properly and some others by inverting the image.
After a long time, I found that photometricInterpretation property is used to control this property of White_on_Black or Black_on_White in TIFF files.
In web I have found that, if we use IndexColorModel, then there is no problem. But, I am not using it and I don't know how to set color model of RenderedOp to IndexColorModel. Did anybody know it?
Is there any other way to set the PHOTOMETRICINTERPRETATION property ?
Any solution or suggestions are welcome...
Edited by: baskaraninfo on Nov 20, 2007 7:20 AM

To view the solution :
http://www.javaworld.com/javaforums/showflat.php?Cat=2&Number=70133&an=0&page=0#Post70133

Similar Messages

  • How to Set "DateOnly" property in DateTimeControl using Javascript.

    How to Set "DateOnly" property in DateTimeControl using JavaScript.

    Is there any specific reason you want to set it through JavaScript ? You can directly set the DateOnly property in the markup itself.
    <SharePoint:DateTimeControl runat=server id="dtControl" DateOnly="true"></SharePoint:DateTimeControl>
    Please can you elaborate on what exactly is the requirement for setting this through javascript?
    Geetanjali Arora | My blogs |

  • How to set fetchsize of sql Query when using Database Adapter.

    Hi All,
    I am using DatabaseAdapter to connect to database and retriving huge amount of data.For improvement in the performance I want to set the "fetchsize" of sql query. I know fetchsize can be preset in Java using Jdbc 2.0 API.Please let me know how to set this value in BPEL when using DBAdapter?
    Thanks
    Chandra

    I talked to the developer of the db adapter - and he told me this feature will be available in BPEL PM 10.1.3 (which is supposed to be production later this year, and a public beta soon). If this is an emergency I would recommend going throug Oracle support and have them file an enhancement for 10.1.2.0.2
    hth clemens

  • How to set a variable in portal session using web dynpro java.

    Hi,
    I have created a web dynpro application, which is running inside portal. I have created a role called "R1". Inside role R1, i have created 3 workset W1, W2 and W3. and inside each workset i have some pages and iviews.
    My requirement is when user logins to the portal , and when he clicks on role R1 for the first time, a login page should come (so that we can do revalidation), and when he enters his password again in that login page , then only workset W1, W2 and W3 should be visible/accessible to him and after successful revalidation, if he clicks again on role R1, in that particular portal session, than that login page should not come.
    for this, i thought i will set a variable in portal session, whenever user successfully revalidated himself, and if after successful revalidation he clicks again on role R1, i will check in doinit method of webdynpro whether variable is set or not (which i already set on successful revalidation), and if it is set then i will do Donavigation else i will present login page to the user.
    Can anyone tells me how to set a variable in portal session using web dynpro java.
    thanks
    Arush

    Hi,
    Try this:
    WDScopeUtil.put(WDScopeType.CLIENTSESSION_SCOPE, key, value)
    WDScopeUtil.get(WDScopeType.CLIENTSESSION_SCOPE, key)
    Ex:
    WDScopeUtil.put(WDScopeType.CLIENTSESSION_SCOPE,"Key1","Value1");
    String value1=WDScopeUtil.get(WDScopeType.CLIENTSESSION_SCOPE,"Key1").toString();
    /people/william.cui/blog/2007/02/12/sharing-session-context-between-parent-and-external-windows-running-on-same-host
    Regards,
    Charan

  • How to set value for trim and bleed using jsx script?

    I have tried using bleedoffsetRect but somehow it is not working. Can anybody please help me on how to set value for trim and bleed using jsx script? Any example will be highly appreciated.
    Following is the code I am trying with:
    var _saveName = new File ( root_path +_strFileName+".pdf");
        var _saveOpts = new PDFSaveOptions();
        _saveOpts.printerResolution = 300; 
        var bleedarray = new Array();
         bleedarray[0] =9.00;
         bleedarray[1]=9.00;
         bleedarray[2]=9.00;
         bleedarray[3]=9.00;    
        _saveOpts.bleedOffsetRect = bleedarray;

    I would expect although I've not actually tried this for the bleed off set box to be larger than the artbaord and the first two values to be negative or 0…
    var bleedarray = new Array(-9,-9,artboard.width+9,artboard.height+9);
    Where 'artboard.width' & 'artboard.height' you will have calculated from your file. An Array(9,9,9,9); would not constitute any boxes bounds.

  • How to set request number of info package using start routine

    Hi All,
    I have a specific requirement in which I need to upload only selective request nos from PSA to DSO.
    Any one can suggest how to set request number of info package using start routine or any other mode so that only selective request should proceed using DTP?
    Thanks
    Sangita

    You'll probably want to do this in a start routine.  It is probably not advisable to hard-code the technical name of the InfoPak.  They seem to remain the same upon transport, unlike DTP technical names which are locally generated.
    I would do a SQL select like this in a start routine, and then filter based on the results of the SQL.  You'll probably want to sort the results by date and time, both descending.  Or do a MAX in the SQL.
    Please let me know if this isn't clear.
    select q~rnr q~logdpid q~tdatum q~tuzeit
    from rsreqdone as q
      inner join rsldpio as p
        on p~logdpid = q~logdpid
    where p~objvers = 'A'
    and p~logdpid like 'ZPAK%'
    and p~source = 'your data source'

  • How to set default value of a table using sequence number

    Dear all,
    Does any body know that how to set default value of a table
    using sequence number.
    But I don't want to use trigger to do that.
    Please help!!!!
    Eldon

    Andrew is essentially correct. You can get around the trigger,
    but not the sequence, if (and this may be a very big if) you can
    guarantee that every time an insert is done into the table, from
    whatever source, the statement looks something like
    INSERT INTO tbl VALUES (sequence.nextval,other_columns_values)

  • HT2534 I followed the instructions on how to set up an Apple ID without using a creditcard or iTunes card many times on several devices, but I still do not get the NONE option on the billing page. Please help??

    I followed the instructions on how to set up an Apple ID without using a creditcard or iTunes card many times on several devices, but I still do not get the NONE option on the billing page. Please help??

    Follow the steps on this page when creating a new account http://support.apple.com/kb/HT2534
    e.g. if using a computer's iTunes : https://discussions.apple.com/message/24321860
    If you've already created an account and are being prompted to review it when trying to see it then you could see if this post by mountaingoatgirl lets you do so without needing to enter credit card details : https://discussions.apple.com/message/24303054

  • How to set HttpURLConnection timeout while reading a stream?

    I want it got time out if the connection if lose while i read a stream from URL
    try {
         int timeout = 700;
         HttpURLConnection connection = (HttpURLConnection) downloadURl.openConnection();
         connection.setConnectTimeout(timeout);
         connection.setRequestProperty("Range","bytes=" + downloaded + "-");
         connection.connect();
         if (connection.getResponseCode() / 100 != 2) {
              error();
         int contentLength = connection.getContentLength();
         if (contentLength < 1) {
              error();
         if (status == DOWNLOADING){
              if (size == -1) {
                   size = contentLength;
              file = new RandomAccessFile(saveTmpName+".tmp", "rw");
              file.seek(downloaded);
         byte buffer[];
         stream = connection.getInputStream();
    connection.setReadTimeout(timeout);
         while (status == DOWNLOADING) { 
              if (size - downloaded > MAX_BUFFER_SIZE) {
                   buffer = new byte[MAX_BUFFER_SIZE];
              } else {
                   buffer = new byte[(int)(size - downloaded)];
              int read = stream.read(buffer); // how to set timeout while it is reading stream
              if (read <= 0)
                   break;
              file.write(buffer, 0, read);
              downloaded += read;
         if (status == DOWNLOADING) {
              status = COMPLETE;
    } catch (SocketTimeoutException  e) {
         error();
    } catch (IllegalArgumentException e) {
         error();
    } catch (Exception e) {
         error();
    } finally {
         if (file != null) {
              try {
                   file.close();
              } catch (Exception e) {}
         if (stream != null) {
              try {
                   stream.close();
              } catch (Exception e) {}
    }I try to set "setReadTimeout()" but is still not through timeout Exception

    ejp wrote:
    Because, there's no FTP client command that allows to do such thing.Socket.setSoTimeout().I agree with you on this one but the OP is talking about the FTPClient API from Apache.
    To the OP,
    BTW, I have reread the Javadoc about the [*API*|http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClient.html] : indeed, there's no setTimeout method, but there is a setDataTimeout method : +Sets the timeout in milliseconds to use when reading from the data connection+ .

  • How  to Set JMS property and Read JMS property in BPEL using JMS adapter

    Does any one know how to set or read more than one JMS property in BPEL using JMS adapter. My queue server is Oracle JMS server.
    Any help and sample is well appreciated

    Hi Van
    I have noted that only the attribute "type" is missing. It seems that when you create a "string" property, the attribute "type" is droped from the XML. If you use another type (as "integer" or "double") it stays there.
    If you try to read your properties, except for the "type" attribute, you should be successful, as I am. If you need, please tell me your email, I can send you my code.
    Source Code:
    in ASSIGN activity (process which SENDS the JMS message):
    <assign name="TESTES">
    <copy>
         <from expression="'string'"/>
         <to variable="HeaderJms" part="outboundHeader"
         query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[1]/@type"/>
    </copy>
    <copy>
         <from expression="'name'"/>
         <to variable="HeaderJms" part="outboundHeader"
         query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[1]/@name"/>
    </copy>
    <copy>
         <from expression="'value1'"/>
         <to variable="HeaderJms" part="outboundHeader"
         query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[1]/@value"/>
    </copy>
    <bpelx:append>
         <bpelx:from>
         <Property name="" type="" value=""
              xmlns="http://xmlns.oracle.com/pcbpel/adapter/jms/"/>
         </bpelx:from>
         <bpelx:to variable="HeaderJms" part="outboundHeader"
              query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties"/>
    </bpelx:append>
    <copy>
         <from expression="'string'"/>
         <to variable="HeaderJms" part="outboundHeader"
         query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[2]/@type"/>
    </copy>
    <copy>
         <from expression="'name2'"/>
         <to variable="HeaderJms" part="outboundHeader"
         query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[2]/@name"/>
    </copy>
    <copy>
         <from expression="'value2'"/>
         <to variable="HeaderJms" part="outboundHeader"
         query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[2]/@value"/>
    </copy>
    </assign>
    in ASSIGN activity (process which READS the JMS message)
    <assign name="Assign_1">
    <copy>
    <from variable="Variable_1" part="inboundHeader"
    query="/ns3:JMSInboundHeadersAndProperties/ns3:JMSInboundProperties/ns3:Property[10]/@name"/>
    <to variable="temp"/>
    </copy>
    <copy>
    <from variable="Variable_1" part="inboundHeader"
    query="/ns3:JMSInboundHeadersAndProperties/ns3:JMSInboundProperties/ns3:Property[10]/@value"/>
    <to variable="temp"/>
    </copy>
    <copy>
    <from variable="Variable_1" part="inboundHeader"
    query="/ns3:JMSInboundHeadersAndProperties/ns3:JMSInboundProperties/ns3:Property[12]/@name"/>
    <to variable="temp"/>
    </copy>
    <copy>
    <from variable="Variable_1" part="inboundHeader"
    query="/ns3:JMSInboundHeadersAndProperties/ns3:JMSInboundProperties/ns3:Property[12]/@value"/>
    <to variable="temp"/>
    </copy>
    </assign>
    Note that I do not try to read the "type" attribute, otherwise it will fail.
    Here is the JMS Header Message received:
    <inboundHeader>
    <JMSInboundHeadersAndProperties xmlns="http://xmlns.oracle.com/pcbpel/adapter/jms/">
    <JMSInboundHeaders>
    <JMSCorrelationID>
    bpel://localhost/pi_lms-c001e/BpelPiAtualizacaoC001E~1.0/3200025-BpInv0-BpSeq1.6-2
    </JMSCorrelationID>
    <JMSDeliveryMode>2</JMSDeliveryMode>
    <JMSExpiration>0</JMSExpiration>
    <JMSMessageID>ID:467DFA1FA1ED459EBF37F51F596C3F12</JMSMessageID>
    <JMSPriority>4</JMSPriority>
    <JMSRedelivered>false</JMSRedelivered>
    <JMSType>com.mercurio.lms.integration.c001eip.c001EIntegrationPoint</JMSType>
    <JMSTimestamp>1201552046253</JMSTimestamp>
    </JMSInboundHeaders>
    - <JMSInboundProperties>
    <Property name="JMSXDeliveryCount" type="integer" value="1"/>
    <Property name="JMSXRecvTimestamp" type="long" value="1201552046698"/>
    <Property name="JMSXUserID" value="lms_dev_int_v1_user"/>
    <Property name="JMS_OracleDeliveryMode" value="2"/>
    <Property name="JMS_OracleTimestamp" type="long" value="1201552046253"/>
    <Property name="JMS_OracleDelay" type="long" value="0"/>
    <Property name="JMSXState" type="integer" value="0"/>
    <Property name="IAS_VERSION" value="10.1.3"/>
    <Property name="JMS_OracleDeliveryMode" value="2"/>
    <Property name="name" value="value1"/> ("type" attribute was droped!!!)
    <Property name="JMS_OracleTimestamp" type="long" value="1201552046253"/>
    <Property name="name2" value="value2"/> ("type" attribute was droped!!!)
    </JMSInboundProperties>
    </JMSInboundHeadersAndProperties>
    </inboundHeader>
    Regards
    Marcelo

  • How to set software library while as a preinstallation step of Appl mgmt pa

    Hi All,
    As a pre installation step of Application management pack
    while setting up the software library.
    Iam getting the below error.
    Software Library directory, /u01/oracle10g_grid/grid102_home/oms10g/sysman/prov/paf, is not accessible from following host(s): ceserp.computechcorp.net, ceserp.computechcorp.net. Error Details: Normal preferred credentials are not set for following host(s): ceserp.computechcorp.net, ceserp.computechcorp.net. Follow Preferences > Preferred Credentials > Set Credentials (Host) links to set normal preferred credentials
    Iam getting the above error.
    and how to set the default credentials by the following navigation.
    Enterprise manager version is 10.2.05
    please help me out
    Thanks,
    Vinay

    You can set credentials only for those targets whish are registered in GRID and are visible in console.
    hosts must be already registered and visible in console.. and they must appear in hosts list...
    Once they are visible, then follow the steps to set credentials and there you will find the host name..
    Regards
    Rajesh

  • How to set variable values in Stored Procs

    Hi all,
    please excuse my newbie questions - I've spent too long using SQL Server......
    Anyway,
    I'm playing with SP basics and was wondering how I can set a variable value in a stored proc, ideally getting a value from a table or some select .
    for instance...........
    CREATE OR REPLACE PROCEDURE RPT_SP_ANT_TESTING
    P1 IN NUMBER,
    P2 IN VARCHAR2
    IS
    TmpNum NUMBER;
    TmpStr VARCHAR2(255);
    BEGIN
    --How do set these?
    SET TMPNUM := SELECT Count( * ) FROM ALL_TABLES;
    SET TMPSTR := P2 + '_APPENDED';
    INSERT INTO TEST_TABLE
    ( STRINGFIELD, NUMBERFIELD )
    VALUES
    ( TmpStr, TMPNUM )
    END;
    Regards
    DC

    Some ways are...
    setting directly
    x := 1;
    setting from a select use INTO clause
    select 1 into x from dual
    setting from a select into a collection type use BULK COLLECT INTO
    select name bulk collect into lName from your_table.
    It would be better if you read the document.
    Thanks,
    Karthick.

  • How to set cursor property from "snap-to-plot" to free?

    dear all,
    is there any one know how to set a cursor property from "snap-to-plot" to "free"?
    this cursor is in a XY graphy
    i couldn't find coresponding property in the XY graph property node
    thank you
    Jack

    It looks like there are different property names depending on your labview version.
    You need to select the ActCrsr and then use the Cursor.Lockstyle property in LV7.1
    You need to select the ActCrsr and then use the Cursor.CursorMode property in LV8.2.

  • How to set updatable property of view object on runtime

    Hello Gurus,
    I am new in adf and using jdev 11.1.2.3.
    I have two view object which has view link and they are based on entity object. In master view i have a column with the name of status. The target is if the value of status is 'active' then i want to allow add rows in detail view and if it is inactive then wants to disable adding or editing in the detail view.
    I don't know how to do this. I don't know how to get the other view object and how to set update able property and where to write code in entity object class or view object class.
    Any advice................
    Thanks in Advance

    There are multiple possible ways to archive this. As the VOs are in a master-detail relationship, you can opt to add a navigation method to the child back to the parent. This method can be accessed via java or groovy to allow the child access to the master row. Once the child has access you can use this to ask the master for it's status and if it's not active disable the edit and update buttons.
    If both master and detail are on the same page in the ui, there is an easier way. Drag the status attribute from the master table onto the page as e.g. inputText. This will create a binding for the attribute which changes if you select a row in the master table. As you don't need to inputtext, switch to the source mode of the page and delete it. This will remove the inputtext put keep the binding. Now you can use hte binding in an EL to set the disable property of other components to true like
    <af:commandButton text="commandButton 1" id="cb1" disabled="#{bindings.masterstatus.inputValue ne 'active'}"/>
    The button will only be active it the binding for masterstatus is active.
    Timo

  • How to set  newer version of stored pages option as never using  httpd.conf

    How to set check for newer version of stored pages option(Tem Internet file-> Setting ) as never using httpd.conf file?

    See:
    *http://kb.mozillazine.org/browser.cache.check_doc_frequency
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold(user set).
    *Preferences can be reset to the default or changed via the right-click context menu.

Maybe you are looking for

  • Help Creating a Windows Partition

    Hi I've got 2 hard drives. I want OS X Leopard on Bay 1 and Windows Vista on Bay 2. In Boot Camp Assistant which Bay do I select? Do I select "Create a second Partition for Windows" or "Erase disk and create a single partition for Windows"? any help

  • Apple TV 2.0 - Old screen saver no longer works-scrolling multiple pictures

    Does anybody know if it is possible to activate the old screen saver. The old that creates a nice scrolling mosaic. Or is it gone forever, really like that one. Several people told it is still there but it doesn't work for me, after 2 minutes the tra

  • I need help for deploy an EJB to Oracle 8i

    I want to deploy an EJB on Oracle8i, but my JDeveloper 3.2 doesn't have the option "Enterprise Java Bean to Oracle8i", it has only the option "CORBA to Oracle8i" in the deploy wizard. Is this correct? JDeveloper 3.1 has the option "Enterprise Java Be

  • Service Cancellation Cost?

    Is there any way to find out online what the cost to break my contract will be as of a certain date? I'm not too thrilled with my current phone, and am looking to move to a smartphone. My cable/internet provider is offering some enticing wireless dea

  • Convert 32 bit EXR to 16 bit.

    Is there a way in Javascript to read the .exr format (32 bit) then convert to 16 bit? I'm rather new at this, so many thanks for your help.