PLEASE HELP - JAI create a tiff file

Hi people,
I am trying to reate a TIFF file compressed for a Fax Server. The resolution of such an image must be 200dpi by 100dpi as per server requirements.
I am managing the create a tiff file with these requirements. However, since I am using a resolution of 200dpi by 100dpi, the final image is squashed vertically. The following is the code which I am using.
// loading the image
RenderedImage src = myCreateImage();
// this is a proprietary method which returns a RenderedImage
// Specifing the tompression Group
TIFFEncodeParam param = new TIFFEncodeParam();
param.setCompression(TIFFEncodeParam.COMPRESSION_GROUP4);
//set the image resolution to 200 x 100
TIFFField[] extras = new TIFFField[2];
extras[0] = new TIFFField(282, TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{(long)200, (long)1},{(long)0 ,(long)0}});
extras[1] = new TIFFField(283, TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{(long)100, (long)1},{(long)0 ,(long)0}});
param.setExtraFields(extras);
OutputStream outputStream = new FileOutputStream ("c:/test.tif");
TIFFImageEncoder encoder = new TIFFImageEncoder (outputStream, param);
encoder.encode(src);
outputStream.close();
outputStream = null;
Any help would be highly appreciated
Thanks & Regards
George Azzopardi

Maybe it's because you're not setting the resolution unit (tag 296)
Example:
TIFFField[] extras = new TIFFField[3];
extras[0] = new TIFFField(282,TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{200,(long)1},{(long)0 ,(long)0}}); //x
extras[1] = new TIFFField(283,TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{100,(long)1},{(long)0 ,(long)0}}); //y
//set resolution unit to inches
extras[2] = new TIFFField(296, TIFFField.TIFF_SHORT, 1, (Object) new char[] {2}); //2 for inches
param.setExtraFields(extras);

Similar Messages

  • Please help me creating a new listener with different port#.

    I have two instances in a server. both have different homes. I want to create a seperate listener for the second one i created.
    But that is not happening.
    here i tried to give name from LISTENER TO LISTENER1 & Port# from 1521 to 1524.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /apps2/oracle)
    (PROGRAM = extproc)
    LISTENER1 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = aixth53)(PORT = 1524))
    When I check lsnrctl status with LISTENER1 , it still shows the other instance home with port#: 1521
    Please help me creating a new listener with different port#.
    Thanks,

    marist89 wrote:
    sb92075 wrote:
    marist89 wrote:
    sybrand_b wrote:
    The listener is a broker only and doesn't play any role in normal communications.
    It just forks a process or a thread, and that's it.And the listener is a single point of failure. Listener goes down, you can't connect to the db. That's why you need two listeners.If listener one goes down, then listener two goes down for exact same reason since it is a single executable file.I'm not playing tit-for-tat with you. Fact is, there are situations where people who are not you might want to use more than one listener.Some folks might want to jab a sharp pencil into their eye, too.
    Just because you can do something, it does not necessarily mean it should be done.

  • Please help me with msi installer file for 11.6.8.* as this is our standard version which we use for all machines in our organization

    please help me with msi installer file for 11.6.8.* as this is our standard version which we use for all machines in our organization

    arai-c wrote:
    I have full version of this software but I am not able to install it silently because it always gives Google toolbar pop up which We dont required
    arai-c wrote:
    the problem is we dont have msi file for 10.6.*.* and hence I am not able to create package for it
    I don't understand; two days ago you wrote that you have it, now you don't...?
    If you don't have it, then why not deploy the current version 12.1.3.153 - I don't see the point of installing an old, unsecure software version.

  • Premiere Pro CS5: please help problem with importing a file error output "there was an error decompressing audio or video"

    please help problem with importing a file error output "there was an error decompressing audio or video"

    this is related to what adobe program/version?

  • I created my itunes account YEARS ago!! And I can't remember the answers to my security questions? Because I cannot remember the answers I cannot make purchases in the app store. Please help me create new security questions.

    I created my itunes account YEARS ago!! And I can't remember the answers to my security questions? Because I cannot remember the answers I cannot make purchases in the app store. Please help me create new security questions. Please help me.

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can try going to https://appleid.apple.com/and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then see if this user tip helps you get the questions reset :https://discussions.apple.com/docs/DOC-4551
    e.g. you can try contacting iTunes Support :http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then try Apple ID Account Security
    or try ringing the number for Apple  in your country and ask to talk to the Account Security Team : http://support.apple.com/kb/HE57

  • Help on creating a jar file

    I created a game and I need help on creating a jar file.
    I know the basics such as having a root folder, a manifest file and what goes in it, etc. And I know some programs like JGrasp can do the jar file for you, but it tells me it cannot find the main class. Does anybody know another program that can do that for me, or can i easily do it manually?
    any help is appreciated

    You can use jar.exe to create jar files.
    Just type jar and hit enter on the console it will give the help message about parameters.
    if you do not really need to put any spesific menifest information. Just zip the files using some zip software and change the extenction to jar. (Thats what I am doing most of the time)

  • I can't create rescuse email to change security questions. Please helps me create rescuse email

    I cant create rescuse email to change security questions. Please helps me create rescuse email

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can try going to https://appleid.apple.com/and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then see if this user tip helps you get the questions reset :https://discussions.apple.com/docs/DOC-4551
    e.g. you can try contacting iTunes Support :http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then try Apple ID Account Security
    or try ringing the number for Apple  in your country and ask to talk to the Account Security Team : http://support.apple.com/kb/HE57

  • PLEASE HELP!  iMovie and .MPG Files

    Hello. Please help me. I'm on a G5. 10.5.3. iMovie 7.1.2 (577) I have a series of .MPG files that I need to import into iMovie to edit, arrange and then export over to iDVD, etc. iMovie does not see the .MPG files. The Apple site states that iMovie sees only MPEG-4 files and DV files. I also own Quicktime Pro 7.5 (149.5). When I open the .MPG file in Quicktime Pro, even though the file plays perfectly, when I select "Export to MPEG-4" so I can create a readable file by iMovie, I get an error message that say's "Failed: Export process terminated unexpectedly (10). Complete frustration. Is there another way I can convert these files so iMovie can see them? What's wrong with my Quicktime Pro? I bought DivX Pro last night. I thought maybe that program would make an iMovie readable file. No luck. I used DivX to convert and it created a DivX file with NO SOUND. Wasted money.
    If anyone has any solutions for my problems noted here or possible alternatives so I can achieve what I'm trying to do successfully, PLEASE ADVISE as soon as possible.
    Thank you for taking the time to read this and THANKS, in advance, for your help.
    Message was edited by: Lloyd Winston

    Lloyd Winston wrote:
    I'm still wondering why QT Pro is failing to convert with that error message.
    Well, if the video codec used in the .MPG container is MPEG2, QuickTime cannot export with a source of this format; it can only play it.
    I remember reading about the reason for Apple doing this, and I forgot exactly why it is, but I think it had something to do with some legal issue. I also read that this is why Mac OS has a separate DVD Player instead of just playing DVDs right inside of QuickTime.

  • Please help on uploading a CSV file on APEX through file browse

    Hi All,
    I need to upload a csv file in the table through file browse button.For that i have created the below process and function.This method is working perfectly fine when the file size is small.But i need to upload the file of 16 MB size and when i try to upload that file it gives error wwv_flow.accept error.Any expert of APEX please help me out on this error.As i am very new to APEX and i need to get this done as early as possible.Please provide any solution ,i will be really grateful to the person.
    function_
    create or replace function hex_to_decimal
    --this function is based on one by Connor McDonald
    --http://www.jlcomp.demon.co.uk/faq/base_convert.html
    ( p_hex_str in varchar2 ) return number
    is
    v_dec number;
    v_hex varchar2(16) := '0123456789ABCDEF';
    begin
    v_dec := 0;
    for indx in 1 .. length(p_hex_str)
    loop
    v_dec := v_dec * 16 + instr(v_hex,upper(substr(p_hex_str,indx,1)))-1;
    end loop;
    return v_dec;
    end hex_to_decimal;
    Process_
         DECLARE
         v_blob_data BLOB;
         v_blob_len NUMBER;
         v_position NUMBER;
    v_clob_data CLOB := 'anything';
    dest_offset NUMBER := 1;
    src_offset NUMBER := 1;
    blob_csid NUMBER := dbms_lob.default_csid;
    lang_ctx INTEGER := dbms_lob.default_lang_ctx;
    warning INTEGER;
         v_raw_chunk RAW(10000);
         v_char CHAR(1);
         c_chunk_len number := 1;
         v_line VARCHAR2 (32767) := NULL;
         v_data_array wwv_flow_global.vc_arr2;
         v_rows number;
         v_sr_no number := 1;
         BEGIN
         delete from scg_recievables2;
         -- Read data from wwv_flow_files</span>
         select blob_content into v_blob_data
         from wwv_flow_files
         where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER)
         and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
         v_blob_len := dbms_lob.getlength(v_blob_data);
         v_position := 1;
    -- Read and convert binary to char</span>
         WHILE ( v_position <= v_blob_len ) LOOP
         dbms_lob.converttoclob(v_clob_data, v_blob_data, v_blob_len, dest_offset,src_offset,blob_csid,lang_ctx,warning);
    v_char := dbms_lob.getlength(v_clob_data);
         v_line := v_line || v_char;
         v_position := v_position + c_chunk_len;
         -- When a whole line is retrieved </span>
         IF v_char = CHR(10) THEN
         -- Convert comma to : to use wwv_flow_utilities </span>
         v_line := REPLACE (v_line, ';', ':');
         -- Convert each column separated by : into array of data </span>
         v_data_array := wwv_flow_utilities.string_to_table (v_line);
    if IsNumber(substr(v_data_array(9),1,1)) = 1 then
    v_data_array(9) := substr(v_data_array(9),1,11);
    else
    v_data_array(9) := '01-JAN-1900';
    end if;
    v_data_array(9) := NVL(v_data_array(9),'01-JAN-1900');
         -- Insert data into target table </span>
         EXECUTE IMMEDIATE 'insert into scg_recievables2 (Account_receivable_number, the_account_number, bill_history_tran, service_number, item_type, the_amount_billed, the_remaining_amount,source_of_payment)
         values (:1,:2,:3,:4,:5,:6,:7,:8,:9)'
         USING
         v_data_array(1),
         v_data_array(2),
         v_data_array(3),
         v_data_array(4),
         v_data_array(5),
         v_data_array(6),
         v_data_array(7),
         v_data_array(8);
         -- Clear out
         v_line := NULL;
         v_sr_no := v_sr_no + 1;
         END IF;
         END LOOP;
         END;

    As noted, this confuses the issue, since a possible answer was posted in the OTHER thread.. Check your server logs, you are probably timing out.. From prior threads with a similar issue:
    Have a look at the httpd.conf file (or get your system administrator to look at it) and see what the value of TimeOut is set to. You may need to increase it in order to export large tables via APEX.
    http://www.apacheref.com/ref/http_core/Timeout.html
    Thank you,
    Tony Miller
    Webster, TX
    A lady came up to me on the street, pointed at my suede jacket and said "Do you know a cow was murdered to make that jacket?"
    "I didn't know there were any witnesses", I replied " Now I'll have to kill you too"

  • Please help -  How to export HTML file into MS word format

    How to export HTML file into MS word file without any change
    in design format?
    As I have been trying to do that but problem is coming in
    formating. Table's witdth and height get disturbed in MS word when
    I import the html file.
    What I do after creating HTML in dreamweaver I save that file
    into .txt format in dreamweaver. and then import it in MS Word. And
    I tried too much for it but invain.
    Please help me in finding the way of solution.
    Please help me as my job is in trouble. It's very urgent
    pleeease help me. I'll be thankful to you.

    Just open the HTML file in Word.
    Walt
    "apollo321" <[email protected]> wrote in
    message
    news:gavbhd$6j4$[email protected]..
    > How to export HTML file into MS word file without any
    change in design
    > format?
    >
    > As I have been trying to do that but problem is coming
    in formating.
    > Table's
    > witdth and height get disturbed in MS word when I import
    the html file.
    >
    > What I do after creating HTML in dreamweaver I save that
    file into .txt
    > format
    > in dreamweaver. and then import it in MS Word. And I
    tried too much for it
    > but
    > invain.
    >
    > Please help me in finding the way of solution.
    >
    > Please help me as my job is in trouble. It's very urgent
    pleeease help me.
    > I'll be thankful to you.
    >

  • Help with creating a jar file

    hi sorry if this is not the place to post the topic but was not sure where to post it.
    i have make an application that has some images and a database but i would like to make a "exe" or somthing so that the client dose not have to open an ide and click run. they can just double click on somting. am not sure about how most of you distrbute your apps. can you help me please.
    the client will be useing windows 95.
    i know that a jar file can do this but i am not sure on how to change the refrences in the code to include the images and every thing. and how would i go about getting it into jar form
    thanks nibur

    You can create an executable jar.
    Note that even if you do this, the user will need to have a JRE installed on their machine for this to run.
    Here's how you can make this executable jar:
    Replace all code that refers to the filesystem (like if you do "File f = new File("c:\myDirectory\file.txt");") to use resources:
    http://java.sun.com/j2se/1.4.2/docs/guide/resources/index.html
    Create a manifest file that has a Main-Class: attribute.
    Then use the "jar" tool to create the jar:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/jar.html
    That doc has "see also" links at the bottom that can tell you about executable jars and manifest files.
    If you're using an IDE, the IDE probably has a tool to create jars for you. In Eclipse, it's under File -> Export. Check your IDE's docs for details.

  • Please help with problem in PDF file and printing

    I have created an Illustrator file with a logo on it. The logo looks fine in Illustrator (CS3 and CS5). If I use "save as" to then save the .ai file to a .pdf file, the logo looks the same as in the .ai file. However, if I use "print" to create a .pdf file, the logo sometimes loses some of the elements in it.
    Here is what the logo should look like:
    Below is what it looks like when I use "print" to generate the PDF file:
    An additional problem is that even if I used "save as" to generate the pdf file, some times, when the file is actually printed physically onto paper, the logo appears in the wrong version (although it looks right on screen).
    Can someone help me with this? I am quite desparet right now because I can't see how I can control this.
    Also, is there any way I can attached the .ai file so someone can look at it?
    The white lines that disappear are not "lines" they are a slightly larger shape placed behind the smaller black one in fonrt.
    Thanks for any help!

    Why are you "printing to pdf"? Does "Save As" yield better results?

  • Help To Create a Jar File

    hi there
    i wanna create a exe file so i am trying to use jar file.
    I am new at creating jar files, my application has a main file and other java files, i am using other java files in my main file my concern is can i create a jar file including all the files and when i run jar file i want to complie java files, i really appreciate if anyone can help me out creating a jar file to compile and execute java files

    http://java.sun.com/j2se/1.4.2/docs/guide/jar/index.html

  • HT201210 Please help - error message saying 'filmware file is not compatable', and videos will not transfer from phone to computor.  what can i do?

    As title says, I keep having this error message 'filmware not compatable' and my videos will not load. 
    Can someone please help this very non-tech-savy lady???!!
    Cheers in advance

    Bad news: It sounds as if you were sold a jailbroken iPhone.
    Good news: File a SNAD with eBay. Make sure all your correspondence has been through eBay Messaging. The fact that the seller has been ignoring you will not sit well with them.
    You will get 100% of your money back, including shipping. Paypal will simply seize his funds and return what is yours.
    Lesson: Don't buy a used iPhone.
    It's much worse for the seller. His PayPal and eBay accounts will be frozen. Until he squares up with both you and eBay, he's out of money and out of business.

  • Please help with creating more diverse iweb blog entries

    I have a blog about sports memorabilia that I use iweb for: http://www.hoopography.com. I have come to a road block in creating blog entries. I have two issues:
    1.) I would like to include more than one image for each blog. I tried to just add images and wrap text around when I create the entry in iWeb, but the images do not show up on the homepage where the blog section is located. I'm assuming I need more than one "place holder", but I have not been able to add more than one. Here is an example of another blog that has multiple images for one entry. Essentially, what I am trying to accomplish: http://offysports.blogspot.com/
    2.) I would like to add YouTube videos so that they not only appear in the individual entry, but also on the homepage where the blog section is located (Otherwise, visitors to the site need to click on the entry to even realize the image is a video. I would like readers to be able to play it right on the homepage.). I have tried to use the "YouTube Widget" to add the videos when working on the entry in iWeb, but the video appears as a still image on the homepage's blog section.
    I have some knowledge of iWeb and Macs. I have been using a Mac and iWeb to work on this blog for about 6 months now, but these 2 problems have stumped and constrained me and the blog. Please help!!!!!! Thanks You.

    I tuned the Place holder into a YouTube Video Widget, and it does display on the homepage, but it does not display as a video. It displays as a still image that the reader has to click on to access the entry and then play the video in the entry instead of playing right on the homepage.
    For the multiple images, are you saying that I can only have one placeholder? I do not follow. I want multiple placeholders for multiple images throughout the single entry (ex: http://offysports.blogspot.com/2010/05/2009-10-panini-studio-basketball.html)
    Thanks

Maybe you are looking for

  • Why is the "All Movies" selection missing from Purchased Movies on Apple TV?

    THere is no longer an option to search "all" of my Purchased iTunes movies in the Apple TV menu. It was nice to just scroll through all of the movies alphabetically. Now I can only search by ---- RECENT , SHARED, OR BY GENRES. This can sometimes be f

  • Abap objects  ( urgent )

    hi which contents can come under abapobjects? plz explain . regds venky.

  • ID CS hangs on one particular image when exporting to pdf

    I use ID 3.01, and have created a two-page folder, with 10 images. I cannot create a pdf, because ID hangs when downloading one image during the export process. It's an 8-bit CMYK Tiff, one layer only, saved without compression. The only thing that m

  • Jrun crash

    hi all i manage a server with cf8. my customer decided to move server to a cloud. from that moment, i lost my sleep... one or twice a day jRun gets the error "JRun closed connection". this is a little report of situation... any help is very appreciat

  • Root Password Problem

    Hi , I am new to solaris . I installed the solaris 10 (beta 7) on P-111 machine. I start installation with Intractive installation but after 1 cd complition , OS reboots but no GUI. I tried 2-3 times. After that i choose the option Jump start and ins