Saving Scanned Image in TIFF Format

I am using Gnome TWAIN Package V4.3 to scan images. I can save the image in JPEG format, but have not figured out how to save it in TIFF format. Can someone provide an example of how to save images scanned using the Gnome package to TIFF Format?
Thanks.

Try this example from www.gnome.sk:
* Copyright (c) 1999-2002 Gnome spol. s r.o. All Rights Reserved.
* This software is the confidential and proprietary information of
* Gnome spol. s r.o. You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms
* of the license agreement you entered into with Gnome.
// JavaTwain package version 5.0
Example8 demonstrates how to save a acquired image to the TIFF file format, using JAI.
You need to install JAI and set a classpath to the JAI library before
compiling and running the example.
import javax.media.jai.*;
import java.io.*;
import com.sun.media.jai.codec.*;
import java.awt.*;
import SK.gnome.twain.*;
public class Example8
protected RenderedOp image ;
public Example8() throws Exception
{ Twain twain = new Twain();
twain.setVisible(false);     
Image awt_image=Toolkit.getDefaultToolkit().createImage(new TwainImage(twain));
RenderedOp image = (RenderedOp) JAI.create("AWTImage", awt_image);
OutputStream os = new FileOutputStream("test.tiff");
TIFFEncodeParam param = new TIFFEncodeParam();
ImageEncoder enc = ImageCodec.createImageEncoder("TIFF", os,param);
enc.encode(image);
os.close();
System.exit(0);
public static void main (String args[]) throws Exception
{ Example8 example8 =new Example8();
}

Similar Messages

  • I need to crop image in TIFF format. what product i need to buy

    i need to crop image in TIFF format. what product i need to buy

    Photoshop should be able to handle cropping your TIFF file, possibly Photoshop Elements as well which would cost less.  You should get the trial version to make sure rather than buying before trying.
    You might also want to check if you already have something on your machine that can do it.  On a PC you should be able to right click the image and choose "Open With" whereby a menu of programs should appear with programs that can open the file.  You can check to see if any of those listed provide the cropping tool.
    If you have further questions you should try posting in the Photoshop forum instead of here (http://forums.adobe.com/community/photoshop?view=discussions).  This forum is primarly for questions about downloading and installing Adobe applications.

  • How can I Display a Image with tiff format in Jpanel?

    How can I Display a CMYK Image with tiff format in Jpanel ? Not in ScrollingImagePanel? Thank you in advance.

    Why nobody can help me?I am very anxious!help me,please!

  • Does Fireworks support saving/editing images in icon format (.ico)?

    Does Fireworks support saving/editing images in icon format
    (.ico)?

    quote:
    Originally posted by:
    Alan Musselman
    By way of a free extension by John Dunning, yes. Check out
    the Fireworks Developer Center Downloads tab. I think its also PC
    only, but not 100% sure.
    Yes, it's PC only. And it can export a FW file to favicon
    format, but FW can't open .ico files and the command doesn't
    support exporting the various bitdepths and sizes that Windows
    icons support.
    It's also available here:
    http://johndunning.com/fireworks/about/ExportAsFavicon

  • Color of Image in tiff format

    Hi all,
    i have converted the image  from JPG format to tiff format but the color is not coming in the tiff format although i have put the  BCOL where color option comes.....
    Please suggest..
    Thanks in Advance
    Ashu SIngh

    I have a similar problem, my TIF picture is 256 color and I upload it with BCOL option, but when printed on the form it's black/white, see below:
    20.10.2009           Uploading TIFF Files to SAPscript Texts                   1
    Load File
    c:\temp\cc.tif
    The file contains     49.434  bytes
    This is a TIFF file with INTEL byte order
    First IFD offset:                                   49.160
    Reading IFD from offset     49.160  Number of Tags         15
    ImageWidth:                                            128
    ImageLength:                                           128
    BitsPerSample levels:                                    3
    BitsPerSample - level 1:                                 8
    BitsPerSample - level 2:                                 8
    BitsPerSample - level 3:                                 8
    Compression:                                             1
    Photometric Interpretation:                              2
    Number of StripOffsets:                                  7
    SamplesPerPixel:                                         3
    RowsPerStrip:                                           21
    Number of StripByteCounts:                                7
    XResolution:                                             0  /          1
    YResolution:                                             0  /          1
    ResolutionUnit:                                          2
    This is a baseline TIFF 6.0 *FULLCOLOR* file
    TIFF raster image resolution in DPI:                    300
    Using resolution from report parameter:                 300
    Text ZHEX-MACRO-TEST1 , Language HR, Object TEXT , Id ST ,
    saved successfully

  • Bridge Image Processor TIFF format

    I use Bridge's Image Processor to batch JPEG images to TIFFs before Photoshopping them, but I've noticed that it saves TIFFs with Mac byte order by default.
    This isn't usually a problem, but many of these images will move to another department in my organisation for inclusion in eBooks and other digital publications, and the Mac byte order causes issues for them and their production processes, necessitating a batch process back to IBM PC order.
    Is there anyway to change the default Image Processor format to IBM PC byte order?

    That's what I thought, but the script doesn't have those parameters, so it would probably be a matter of delving deeper than the Image Processor functionality.
    I can make batch that would do it, rather than Image Processor, but it would be nice to have this feature built-in.
    I'll see what the PS forum has to say.
    Cheers.

  • Saving scanned images

    I'm using a MacBook to import images from an scanner using Photoshop Elements. It asks me what byte order, PC or MAC? What's the difference?

    It refers to the Endianness of the CPU. Traditionally, Macs were big-endian (bytes were ordered by largest to smallest) and PCs were little-endian (bytes ordered from smallest to biggest). With the Intel switch, both are now little-endian. However, most machines can actually read both so this is no longer the issue it once was.
    Since you're on an Intel machine, it's better to put it as PC but it really won't make a difference.

  • Problem Saving Image to TIFF

    I'm trying to convert a scanned image to TIFF format. When I try to encode the image to TIFF I get the following errors:
    ava.lang.Error: Int or float buffers require 32-bit data.
         at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(TIFFImageEncoder.java:206)
         at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(TIFFImageEncoder.java:153)
         at DocScan.save(DocScan.java:171)
         at DocScan$TwainSaveRunnable.run(DocScan.java:100)
         at java.lang.Thread.run(Thread.java:484)
    Some of the code I am using is as follows:
    public void scan()
    Twain twain=new Twain();
    twain.setVisible(false);
    twain.setPixelType(Twain.BW);
    twain.setCurrentUnits(Twain.INCHES);
    twain.setXResolution(100);
    twain.setYResolution(100);
    twain.setFrame(0,0,8.5,11);
    twain.setBrightness(900);
    twain.setXScaling(.5);
    twain.setYScaling(.5);
    image = Toolkit.getDefaultToolkit().createImage(new TwainImage(twain));
    setSize(width=image.getWidth(DocScan.this),image.getHeight(DocScan.this));
    repaint();
    public void save()
    { fd = new FileDialog(this, "Save a file", FileDialog.SAVE);
              fd.setVisible(true);
              fileName = fd.getFile();
    File f=new File(fileName);
    try
    PlanarImage PImage = JAI.create("awtImage",image);
    FileOutputStream out = new FileOutputStream(f);
    TIFFEncodeParam param = new TIFFEncodeParam();
    ImageEncoder encoder = ImageCodec.createImageEncoder("TIFF", out, param);
    encoder.encode(PImage);
    out.close();
    catch (Exception ex)
    { ex.printStackTrace();
    I would greatly appreciate any help.
    Thanks

    Hello All,
    The below code allows you to read TIFF images. You must have Java Advanced Imaging installed on your system for this to work
        RenderedImage ri = JAI.create("fileload", filename);However the problem I am facing is that, when I save the image back to another TIFF file, the image is getting saved in negative colours, i.e, black in the final image, where originally white is there.
    I hope I am clear about the problem and also hope that the code works for you.
    best wishes
    Issac

  • Trouble saving the image, save as button not working

    i'm having trouble in saving the image in PNG format, it seems that the "save as" button is not working properly, what should i do?

    Save from what program? On what system? In any case, ask in the product forum of whatever program you are referring to...
    Mylenium

  • TIFF Format

    Hi all,
    I have known about code is se38 for RSTXLDMC. but
    How to create uploading tiff file to sapscript text??
    Reply me soon,
    thx,
    s.suresh

    To insert logo in SAP script, follow the steps below:
    /: INCLUDE Z_YOUR_LOGO OBJECT TEXT ID ST LANGUAGE E
    These are the steps to be followed for uploading graphics in R/3 system
    1. First save the file as BMP
    2. Open the BMP file in IMaging (Goto -> Programs -> Accessories -> Imaging) and
    make it Zoom as 100% and save as *.TIFF
    3. Open SE38 and execute program RSTXLDMC
    4. Give your TIFF file path name
    5. Select Bcol (for Color)
    6. TEXT ID will be ZHEX-MACRO-*.
    7. Inplace of * write your own logo name (ZCOMPANYLOGO)
    8. Execute the program
    9. Now Goto SE71 create your ZFORM
    10. Create logo window
    11. Goto text element of logo window
    or
    In 4.6x :-
    1. Goto SE71 Change the mode to GRAPHICAL
    2. Choose the Graph Tabstrips
    3. Now type in some name for the LOGO WINDOW
    4. Press the IMPORT BUTTON and then IMPORT the BMP file from your DESKTOP
    5. The code will be written automatically. You just need to drag and drop wherever you want
    the graphics to be.
    Or
    Upolad in the R3 using Se78 and use the Include statement in the script
    standard program is RSTXLDMC FM to upload image in tiff format
    Follow the link below u may get useful information
    http://sapscriptcode.blogspot.com/2007/05/faq-for-sap-scripts.html
    Reward if useful

  • How does the TIFF format compress images?

    When we choose "File> Save As" to save an image to a TIFF file, a TIFF Options dialogue box appears with 4 image compression options( None, LZW, Zip, Jpeg). What is this for? Does the TIFF format compress images? Are they destructive to the image quality? THANK YOU

    If you select no compression, it will take up too much space, guaranteed.  TIFF lets you pick any compression method supported by your program and the viewing program.  Some are lossy, some are lossless.  Most TIFFs tend to be compressed in LZW or ZIP, both of which are lossless.  You can also choose to compress your TIFF using JPEG compression, which is lossy, but I can't imagine why you would do this instead of simply saving as a JPEG file, which is more likely to be properly opened in browsers than a JPEG-compressed TIFF file.
    And in response to one of the previous posts, not all compression throws away details from your file.  Only lossy compression (e.g., JPEG, or in the music area MP3) throws away data.  The lossless compression techniques simply encode the data in fewer bits if possible.  (One important fact not relevant to the web, where you will use 8-bit-per-channel files:  If your photos are 16-bit-per-channel, don't save in LZW compressed format; they will actually become larger than the uncompressed image.)  For a simplified example, if there is a series of 16 pixels of solid white, a losslessly compressed image will have code that says, in effect, 16 pixels of (255,255,255) using an abbreviated code instead of simply listing (255,255,255) sixteen times.  It builds up a directory of byte combinations and can use just a few bytes to refer to many bytes of image data.  Because the coding and decoding is exact, there is no change in the image data when it's opened.
    JPEG is a lossy compression technique that doesn't actually record pixel values at all.  It uses formulas to specify averages and changes within regions.  In effect, it records the fact that a given group of pixels has values centered on X color, and that the upper left is much pinker and the lower right is much greener than the average.  When you pick the degree of quality for JPEG compression, you tell it how small to make the comparison cells.  As you can imagine, if the image has text, tree branches, or other highly contrasty subject matter, this will cause serious weirdness if the comparison cells aren't very small (i.e., you don't have the quality set to max).

  • I have used Image Capture to scan images/documents and then saved them as either PDFs or PNG files.  For some reason, just this past week Image Capture will no longer save the file.  It scans, and the Scan Results window pops up, but it won't save file.

    I have used Image Capture to scan images/documents and then saved them as either PDFs or PNG files.  For some reason, just this past week, Image Capture will no longer save the file.  It scans, and the Scan Results window pops up, but it won't save file.
    The file name has no special character in it, just letters and no spaces.
    I have done this in the past and it has worked, but now it will not.
    I have not upgraded any software, that I am aware of.
    After scanning, the Image Capture pops up the Scan Results with the file name in the window, but neither the Scan Results nor the Image Capture window responds to inputs.  The Image Capture window is frozen, with only the "Overview" and "Cancel" buttons active (but non-responsive).
    Is this a software issue or a scanner hardware issue?  I am using a HP Photosmart C6200 series printer/scanner on a network using a Time Capsule airport.
    Thanks.

    I had the same problem.
    Got a 90% fix.  Apparently the Mavericks preferences won't work with Yosemite, so I just deleted the Image Capture preferences.
    Unfortunately, the "Scan to" folder seems to be permanently set to the Pictures folder.
    1.  Quit Image Capture
    2.  Go to Finder > Go > Home, which opens up your home folder (named after your user name)
    3.  Open Library > Preferences > com.apple.ImageCapture.plist - Drag this file to the Trash
    4.  Start "Image Capture", click "Details" and change all your settings as you prefer
    5.  Quit and restart "Image Capture".   Notice it remembers all your settings except "Scan to" folder.  It insists on saving to "Pictures".
    That's as far as I was successful.  I tried changing the "Scan to" folder to "Desktop", but on launch, Image Capture always sets it back to "Pictures".
    This is what I tried:
    6.  Download and install "Pref Setter" from http://www.nightproductions.net/prefsetter.html
    7.  Quit "Image Capture".  Right-click on "com.apple.ImageCapture.plist" and open with Pref Setter.
    8.  Search for "Pictures", which finds "~/Pictures" (the tilde character at the start means your home directory).
    9.  Double-click on "~/Pictures" and change it to the folder you prefer.  I like "~/Desktop"
    10. Choose File > Save then Quit from Pref Setter.  Note that re-opening the plist file still shows "~/Desktop"
    11. Start up "Image Capture" -- on startup, "Image Capture" sets "Scan to" folder to "Pictures"
    I consider this a bug.

  • Displaying the Tiff format image in JPanel

    How can i display an .tiff formatted image in a jpanel ?

    How can i display an .tiff formatted image in a jpanel ?

  • Scanned images crashing lr 3.5

    After upgrading to3.5, my scanned images from negatives (tiff dng files created in Vuescan 9) crash the program as soon as I make an adjustment in the lens corrections panel. This was not an issue before I upgraded from 3.4.1. Worse, the scanned images that I edited with the lens corrections panel before upgrading crash the program as soon as I try to bring them into the develop module. This is so unacceptable to me me I can hardly stand it. I've tried Googling the problem, but I'm not coming up with anything. Any help would be much appreciated.

    I'm using two scanners (Canon 9000F and Plustek 7600i) and import 48bit ProPhoto RGB TIFF files with no issues in LR 3.5 on Windows 7 64bit. It could be due to some incompatibility with Vuescan's DNG file format or preferences setttings:
    http://photo.net/digital-darkroom-forum/00Tfhm
    I understand why you are using DNG, but for scanner output it may not be the best choice. I routinely do post-scan "destuctive" Photoshop editing of my TIFFs after importing them into Lightroom. This can include spot removal, image cleanup, rotation, and cropping, all of which are much easier to do with PS's more advanced tools. I work on my TIFF scan image files simultaneously in PS and LR, with LR automatically updating my saved PS changes "real-time." DNG's can NOT be modified!
    If you have the same issues with TIFFs try opening them in Photoshop or PS Elements, check the profile Vuescan assigned and then resave the file from inside PS. See if that corrects the problem.

  • Disk Utility: What does "scan image for restore" do?

    Before restoring a disk image, I know that I need to use Disk Utility's "Scan Image for Restore…" feature.
    Exactly what does this feature do?

    I asked because I didn't know.
    I was helping someone upgrade his PowerMac G5 from the original 80GB hard drive to a 1TB drive.
    Since the G5 can accommodate two internal drives, I could have simply added the new drive and used Disk Utility's "restore" feature to migrate his data directly from the old drive to the new drive.
    But it was more convenient for me to work at home so I removed the old drive, and brought it home along with the new drive.
    I couldn't connect both drives to my MacBook Pro, since I only have one SATA drive dock. So I did it like this:
    1. Connected the old drive to my SATA dock.
    2. Create a disk image from his old drive, saving it to an external USB drive.
    3. Disconnected the old drive from the SATA dock and connected the new one.
    4. Restore the disk image to the new drive
    Of course, when I tried step 4, I got an error message about needing to do a scan first. That's what led me to this question.
    I have a follow-up question: When I created the image, I didn't bother changing the default image format, which is "compressed." If I had given the matter a little thought, I could have created a read-only image, since I would never need to change the image.
    If I had used read-only, would Disk Utility have created the checksums on-the-fly when it created the disk image?

Maybe you are looking for

  • Saving PDF files in a password protected FTP site

    Hi Experts, I have an Adobe Form which I want to save in a Password protected FTP site. I have written the following code in the submit button TYPE = HTTP Submit URL = ftp://username:password@host/ But once the submit is clicked, I can see ONLY the d

  • Alter database open resetlogs

    Hi, when I try to duplicate my database by RMAN I have : RMAN-06053: unable to perform media recovery because of missing log RMAN-06025: no backup of log thread 1 seq 1452 scn 252730 found to restore I connect to duplicate database in sqlplus , it is

  • Plan Versions for different country payroll implementation

    We implemented Indian Payroll Now we are in process of implementing USA Payroll for my company what would be the plan version Already we have one plan version in place that is for indian payroll Can we create one more plan version for usa payroll? Ho

  • How to remove and reinstall PSE 10?

    I am unable to edit PSE 10 to completion.  The editing works fine until I try to close it.   It doesn't finish and I get an error message "failed to import" (to Organizer) with a bar chart showing 95% completion.  In effect, I can't edit.  One other

  • How to fix parasite noise?

    Hi, In FCE I have a sound with some parasite noises somewhere. Like a crack. And so I would like to know if you have an idea of what I can do to reduce this noise without shutting sound down because there is music behind. On a french forum I have exp