Converting tif to jpeg

Hi
I'm trying to convert a tif file to a jpeg file with jimi, but i get only a black jpeg as result.
My code looks like this;
import java.awt.Image;
import java.io.File;
import java.io.IOException;
import com.sun.jimi.core.Jimi;
import com.sun.jimi.core.JimiException;
public class TiffConverter {
     * @param args
    public static void main(String[] args) {
      File tifFile = new File("test.tif");
      File jpgFile = new File("test.jpg");
      ConvTif2Jpg(jpgFile, tifFile);
     * Convert
     * @param jpgF
     * @param tifF
    public static void ConvTif2Jpg(File jpgF, File tifF){
        Image image = Jimi.getImage(tifF.getAbsolutePath());
        try {
            Jimi.putImage(image, jpgF.getAbsolutePath());
        } catch (JimiException ex) {
            ex.printStackTrace();
}anyone know why i get only a black jpeg ? is there an other way to transform the tif ?
thanks a lot !!

As much as I love Jimi Hendrix, I don't know if it's the preferred choice. The standard way to do image I/O in J2SE is to use ImageIO and other classes of the packages javax.imageio.*
One things that's annoying is that the J2SE isn't shipped with a TIFF reader or writer, just JPEG, PNG, BMP, WBMP and GIF:
[http://java.sun.com/javase/6/docs/api/javax/imageio/package-summary.html]
To get more reader and writers, you have to download "Java Advanced Imaging-Image I/O"
[http://java.sun.com/products/java-media/jai/downloads/download-iio-1_0_01.html]

Similar Messages

  • Converting tif to jpeg best program?

    What is the best program to convert tiff files to jpeg?

    "Best" really isn't much of an issue here. It's mostly a matter of whether or not a given app can read the TIFF format and then save them as a JPEG. This list is hardly all inclusive:
    Photoshop (expensive)
    Photoshop Elements (easily found latest version for under $80)
    Graphic Converter
    Pixelmator
    Preview will also do it, you just have to watch the quality level for JPEG output so you don't destroy the image. Higher quality will give you larger JPEG images (though still much smaller than uncompressed TIFF), but will be almost indistinguishable. The more you reduce the quality level, the smaller the JPEG images will be, but detail will noticeably suffer the lower you go. JPEG is also a one way street. Once you compress an image, you can't get the original pixel values back.
    As a test, I opened a 7.4 MB TIFF and saved it out of Preview as a JPEG at the highest quality level. The resulting file was 2.1 MB. As expected, it's almost identical to the TIFF. You have to zoom way in to find pixels that are different from the TIFF.

  • How do I convert tif files to jpeg?

    I have a mixture of tif and jpeg photo files and want to make all of them jpeg to down load into a Sony TV. It accepts jpeg only!

    Hi there
    You can accomplish this by using Scripts and the Photoshop Image Processor.
    First, go to File > Scripts > Image Processor
    A dialog box will pop up where you can chose your source and destination folders, and the file type you want to save the images as. Once you have your preferences set, click "Run" and there you go! (Note that 12 is the highest quality value you can put for the save as jpeg script)
    For directions on how to accomplish this using Bridge + Photoshop, here's a helpful video:
    Good luck!

  • I have a new Sony alpha 77ii.  My PS version is 5.0.  When I open the files in Bridge, they are .ARW files.  How do I convert them to JPEG's so I can view and edit them?

    I have a new  Sony alpha 77ii.  My PS version is 5.0.  When I open the files with Bridge they are .ARW files.  How do I convert them to JPEG's or something I can view and edit?

    You can use Adobe's free DNG converter to convert proprietary raws to the universal DNG raw format. Here are the links:
    Adobe - Adobe Camera Raw and DNG Converter : For Windows : Adobe DNG Converter 9.0
    Adobe - Adobe Camera Raw and DNG Converter : For Macintosh : Adobe DNG Converter 9.0
    Converting to JPEG will be an extra step afterwards.
    Benjamin

  • Can you edit a TIFF in iPhoto 09 without it converting to a JPEG?

    I am wondering if I can edit photos in the TIFF format in iPhoto 09 without having them automatically converted to the JPEG format? I read that you should never edit a TIFF photo if you want to keep it in that format, because iPhoto will immediately convert it to a JPEG the minute you edit it without any warming.
    I am in the process of scanning thousands of slides and I don't want to scan them as TIFFs only to have iPhoto convert them to JPEGs. I will do most of my editing with Photoshop Elements 6 for Mac, but just in case I ever edit a TIFF in iPhoto 09, I need to know if it will automatically be converted to a JPEG or not.
    Today I tried editing a TIFF in iPhoto 09 and as far as I could tell, it didn't change the format to JPEG, even though I just read in the iPhoto 09 Missing Manual today that it WILL in fact change it. Am I missing something? I just assume if it still shows the TIFF extension, it has NOT been converted to a JPEG! Any help would be appreciated. Thanks, Linda

    Thanks Terence. What a relief. I still don't understand what the book I read was talking about then. Here's a quote from the section I was referring to in "iPhoto 08: The Missing Manual" book, p 91 (ISBN: 0596-516185):
    "Note, however, that the instant you edit a TIFF-format photo (Chapter 7), iPhoto converts it into JPEG.
    That's fine if you plan to order prints or a photo book (Chapter 11) from iPhoto, since JPEG files are required for those purposes. But if you took that once-in-a-lifetime, priceless shot as a TIFF file, don't do any editing in iPhoto-don't even rotate it- if you hope to maintain its perfect, pristine quality."
    After my test results, I thought maybe this was something that had changed from iPhoto 08 to iPhoto 09, so I went to the bookstore yesterday and checked the same book for iPhoto 09, and there it was, the same quote! (on a different page, of course).
    Anyway, thanks once again for your confirmation that my test was indeed correct. Linda

  • Can i open eps file in photoshop element 12 and convert it into jpeg?

    can i open eps file in photoshop element 12 and convert it into jpeg?

    You can open it in Irfanview (free), then save as JPEG.
    Download the program here:
    IrfanView - Official Homepage - one of the most popular viewers worldwide

  • I have LR from 2 through 4.4,  I am simply trying to adjust CR2s, and convert the them JPEG.  LR says my Perfectly Clear is expired but my update is up to date and all paid for.  What is Perfectly Clear and how do i get this puppy to be part of the team?

    i have LR from 2 through 4.4,  I am simply trying to adjust CR2s, and convert the them JPEG.  LR says my Perfectly Clear is expired but my update is up to date and all paid for.  What is Perfectly Clear and how do i get this puppy to be part of the team?

    Perfectly Clear is a 3rd party commercial plugin for Lightroom.
    http://www.athentech.com/products/plugins/
    Have you ever installed it as a trial in the past?

  • Convert TIF Binary data to PDF Binary data

    Hi All,
    I have uploaded TIF file into table in system in Binary format.
    I need to create a spool from this Binary data, the spool should open in TIF format or PDF format.
    Can you help me in doing this.
    As I knw how to convert PDF to Spool, it would be even helpful, if you tell me how to convert TIF binary data into PDF binay data.
    Thanks in advance.
    Abhay

    Hi Sandra,
    Below is the requirement from Client:
    1. PDF and Tif files will be attached to order (transaction CRMD_ORDER).
    2. I have to pick the PDF and TIF attachments mentioned above using a batch report.
    3. Then this batch report will create a spool for the PDF file and TIF file attachements.
    4. Then the spool will be picked by another program and print them together in night.
    I hope it is clear now?
    Things I have done:
    1. Created report ZPDF_TIF which is copy of RSPO0023.
    1. Used the report ZPDF_TIF to pick up the PDF and TIF file in binary format from the order (transaction CRMD_ORDER).
    2. Able to Convert PDF to spool.
    I hve problem for:
    1. I want to use the program ZPDF_TIF to work for both PDF and TIF file.
    2. I have the TIF data in Binary (1022) into internal table picked using the report ZPDF_TIF.
    2. I want to convert TIF to spool which is problem child for me as of now.
    I hope the details are clear now.

  • How do I convert a scanned JPEG file to a Word document with Acrobat pro X1?

    How do I convert a scanned JPEG document into a Word document. I have Adobe Acrobat Pro Xl.

    Was it a scan of a page with only text? Text and pictures? Or just a picture?

  • Applescript to convert PDF to JPEG using Preview?

    I know there's an existing script available on the internet that converts PDFs to JPEGs (it's here: http://macscripter.net/viewtopic.php?id=25350) BUT, for whatever reason, the quality, even when set to 600dpi, is crap. I get better results simply opening the PDF in Preview then saving as JPEG... even a 150dpi JPG from Preview is higher quality than a 600dpi file from this script I found...
    So, what I need help with is creating a applescript that converts PDF's to JPEGs using Preview (or whatever, as long as the quality of the JPEG is good). I have very little scripting experience so help is appreciate.
    Ideas?
    Thanks.

    Frank Caggiano wrote:
    Decided to finish this up as an interesting exercise. Hope you find it useful.
    One question for the  Applescripters here. The Automator action run as a shell script seems to return a list of filename aliases but the return value while looking like a list didn't behave as a list. I managed to rip it apart to get to the filepaths and the script works but it seems really kludgey . So my question is given the return of the Automator run as a do shell script what is a more correct way to handle it?
    Convert PDF to JPG
              © 2011 Frank Caggiano
              GNU Public License
              Convert pfd files to jpg images.
              The converted JPG files wil have the name of the original PDF files with the extension changed to JPG.
              The actual conversion uses the Automator action Render PDF Pages as Images.
              The user needs to create an Automator action with Render Pages as Images as the single action.
              Set the parameters for the conversion in the action.
              NOTE: this script assumes you're converting to jpg files If you select another output format in the action this script will
              need to be modified.
    -- choose PDF files
    try
              set sourceFiles to choose file with prompt "Select PDF files" of type {"com.adobe.pdf"} with multiple selections allowed
    on error msg number n
              if n ≠ -128 then
                        error "Unknow error: " & msg & space & n
              else
      quit
              end if
    end try
    -- choose destination folder
    try
              set destFolder to choose folder with prompt "Select Destination Folder"
    on error msg number n
              if n ≠ -128 then
                        error "Unknow error: " & msg & space & n
              else
      quit
              end if
    end try
    set destFolder to quoted form of POSIX path of destFolder
    -- select workflow
    try
              set workFlow to choose file with prompt "Select Work Flow" of type {"com.apple.automator-workflow"}
    on error msg number n
              if n ≠ -128 then
                        error "Unknow error: " & msg & space & n
              else
      quit
              end if
    end try
    set workFlow to POSIX path of workFlow
    repeat with sourceFile in sourceFiles
      -- get base name of the source file
              set bName to do shell script "basename " & quoted form of POSIX path of sourceFile
      -- Strip off the extension
              set text item delimiters to "."
              set bName to text item 1 of bName
              try
                        set res to do shell script "automator -i " & quoted form of POSIX path of sourceFile & space & workFlow
              on error msg number n
                        error msg & space & n
              end try
      -- Seems strange to  do it this way but it works
              set text item delimiters to "\""
              set theList to text items of res
    We go through the list of converted files. If there is more then one then the second and subsequent files
    will get and integer added to the name to avoid conflict.
              set cnt to 0
              repeat with convertedFile in theList
                        if convertedFile does not contain "alias" and convertedFile does not contain "}" then
                                  set fullPath to quoted form of POSIX path of convertedFile
                                  if cnt ≠ 0 then
                                            do shell script "mv " & fullPath & space & destFolder & bName & "_" & cnt & ".JPG"
                                  else
                                            do shell script "mv " & fullPath & space & destFolder & bName & ".JPG"
                                  end if
                                  set cnt to cnt + 1
                        end if
              end repeat
    end repeat
    Hi Frank--
    I tried the script you wrote and created the Automator workflow with the single action as requested, saved it to the desktop then selected it when your script's dialogue requested it. However, at that point your script game me the following error. Ideas? I did save the workflow as a workflow and I selected it directly, so I'm not sure why it thinks that the "workflow file does not exist" ? :
    error "The workflow file does not exist. 255" number -2700 from «script» to item

  • When I import Nikon NEF photos from my D3S, it automatically converts them to jpeg. How can I fix this?

    When I import RAW photos from my D3S, iPhoto automatically converts them to jpeg.  I want to edit my images in a RAW format.  I used to be able to save my images as a NEF in iPhoto and edit them in RAW on Photoshop.   Can this be fixed, or do I have to find a new software to manage my RAW photos?

    RAW files are just sensor dumps of the raw data and can't be viewed unless a jpeg version is created. The jpeg version of the photo is created by iPhoto for display purposes.
    Make sure Photoshop is set as the external editor in iPhoto's Advanced preference pane and that RAW files are edited when using the external editor.
    You do know that when editing a RAW photos with Photoshop from within iPhoto the edited version must be saved to the Desktop and imported into iPhoto as a new file.  

  • Can anyone tell me which product allows me to convert pdf to jpeg?

    can anyone tell me which product converts pdf to jpeg.

    Hi
    You can do this in multiple programs (photoshop, Illustrator & acrobat).
    In Acrobat just open the PDF the go to File>Export>Image>jpeg.
    In photoshop you can open the pdf the just save as .jpeg.
    In Illustrator you can open the PDF then export as a jpeg.
    Hope this helped.

  • How to view/convert IMG to JPEG

    Hi,
    Is it possible to view IMG image file (BLOB) or convert it to JPEG?
    Thank you :)

    you may use irfan-view for this

  • How do i convert raw to jpeg in aperture

    How do I convert raw to jpeg in Aperture 3 ?

    I find all this rather strange! I often convert RAW to Jpeg if I want to keep an image for reference but it doesn't merit or require the 8 to 10MB of the RAW file (on my computer, my external drive, or anywhere else). For example, I take photos of artefacts in museums, and I also photograph the labels/legends beside them, for reference. I can keep those solely as quite small Jpegs since I'm never going to want to print them.
    (No, I don't want to switch settings on the camera while I do this - I'll only forget to switch back, and then have loads of low-res Jpegs that were meant to be glorious RAW).
    In other software I've used, there's a batch convert that makes this very simple. Seems that in Aperture I'm obliged to export and then re-import. Not a big deal, but a slight pain in the arse all the same, and a little odd.
    Anyway, thanks to the above posts, I now know how to do the export-import malarkey. I couldn't find it in the manual.
    cheers,
    Helen

  • Convert RAW to jpeg

    Hello,
    I'm using Aperture to organize my photos and have been shooting in RAW. I'd say that out of 100 pics, I might take advantage of the RAW format to edit 5 of them. I'm new to photography and during the learning process have taken a lot of pics of, for example, my dog that I really don't need in RAW format but don't want to delete altogether. I intend to continue shooting in RAW, but would like to convert my older pics to JPEG as I've filled up my external hard drive that my library is kept on (I'm using a 2006 core duo macbook). I know the usual advice is "never convert raw to jpeg to save space, just buy a new hard drive," but I really don't need 500+ pics of my dog in RAW format, jpeg will be 100% fine, and don't want to shell out the money for a new hard drive right now (although eventually I will.)
    My question is: is there a way to selectively convert my photos or even entire projects from RAW to jpeg and maintain the organization structure? I know I can export to JPEG, but then I have to re-import and re-organize them all, correct? Either way, I then have to go through and delete the RAW versions, right?
    Thanks,
    John

    I have a desktop PC with 4 internal drives that I'm backing up my images to over my wireless network on a (somewhat) regular basis, so if/when the external does crash, i've got the images backed up. The problem is that I've only got a 60Gb in the laptop, and a 320Gb external that is partitioned to allot 90Gb for time machine and the rest shared between music and photos, which has filled up pretty quickly. I'm looking into a 1TB external for the future, but I really like my 320 western digital as it is USB powered and really great for on-the-go. Maybe I'll think about a smaller library on the 320 and the permanent library on the 1TB. In the meantime, I need to free up some space on the external one way or another.
    Thanks,
    John

Maybe you are looking for

  • INTERNET CONNECTION NOT DETECTED message with Crystal Reports 2011

    Hello:      We upgrade from SQL 3008 R2 to SQL 2012 SP1.   Had trouble with Crystal Reports not opening reports.  Information on the internet indicated that you had to reinstall Crystal Reports after upgrading SQL.  We did a repair of Crystal Reports

  • Displaying subtab canvas

    Hi to everyone, No doubt this house is full of geniuses. Problem i have in my application is I have a main tab canvas which has two tab pages 1. Main 2. Details on detail page i want to display multiple subtab pages. What I want to achieve is when I

  • Where are image files (Bug Tracker Application)

    I downloaded the Bug Tracker packaged application and in one of the list (Administration Tab), the list is presented with images. For example User Profiles item show the Image attribute as menu/user_red_32.gif I want to know where this image is actua

  • What is the best video format to edit??

    I have been working with some .wmv files which I just found out are not that great to work with, and could be why CS3 keeps crashing >_< I've seen a list of supported formats but I want to know from someone who has experience, what file type overall

  • CS6 not seeing entire font list

    The machine is an older mac running OSX 10.6.8. Both Illustrator CS5 and CS6 are installed (have been for years). This morning, CS6 sees only the top half of the font list. Everything below is blank. It scrolls as if other entries are there, but the