Tiff to GIF conversion

I am using Photoshop library in vb.net and converting the eps, tiff files to GIF.
While saving the tiff file as GIF, i receive an error 'general photoshop error occured. The parameters for command 'Save' are not
currently valid'. Also the GIFoptions like color, dither, forced, matte and transparency properties displays the message 'The property was not
initialized'.
Please let me know what might be the cause of this error.
regards,
Sashi

799847 wrote:
Hey
Sorry but I am quit new to java programming and the "Fire up the execution service in a ContextListener object" is not clear to me!
What I'm suggesting is that you have a queue of (I guess) print requests. I'm assuming you are printing stuff at the server end, not on the client machine. When someone requests a document be printed it adds a request to the queue, and then returns to the user immediately.
A separate process, though still running inside Tomcat, removes these requests one at a time from the queue and processes them (in the order they were submitted). When the queue is empty this process simply waits until an item is added.
You may want to use more that one such process, depends on how resource hungry they are, each taking requests from the same queue. In general you'll find there's an optimal number of these processes (Threads) for best performance, but that optimal number can often turn out to be one. Tends to depend on how good a machine you're running on, how many cores, how much simultaneous IO.
This involves creating the queue and starting the processing thread(s) as the web application starts, and closing them down when it stops. The proper way to do this is to create a class which implements ContextListener and declare it in web.xml. Tomcat will then create an instance of the class and call the appropriate methods on it as the web application is started and stopped.
There are a number of classes specifically designed to handle this kind of queue processing in the java.util.concurrent package. In particular there are two BlockingQueue classes, which is a type of queue that can automatically make a caller wait until there's something in the queue. There are also ThreadPoolExecutors which are designed to manage a group of threads taking jobs off a queue.

Similar Messages

  • TIFF to GIF using JMagick

    Hi,
    I am new to Graphics. Can someone help me in writing a java code to convert from TIFF to GIF using Image Magic (JMagick).
    I tried it, i compiled successfully, but I am unable to run the code. I have JMagick.jar in my classpath.
    When I am running, I am getting the following Exceptions:
    Exception in thread "main" java.lang.NoClassDefFoundError: Test (wrong name: test/Test)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    following is the code i used.
    package test;
    import java.awt.Dimension;
    import java.awt.Rectangle;
    import magick.ImageInfo;
    import magick.MagickImage;
    import magick.MagickException;
    import magick.QuantizeInfo;
    import magick.ColorspaceType;
    import test.MagickWindow;
    import magick.MagickApiException;
    import magick.PixelPacket;
    import magick.DrawInfo;
    import magick.ResolutionType;
    import magick.ProfileInfo;
    import magick.MontageInfo;
    import magick.Magick;
    import magick.MagickInfo;
    import java.io.IOException;
    import java.io.FileOutputStream;
    import java.lang.*;
         public class Test {     
         public static void main(String[] args) throws Exception
         /*try {
         ImageInfo info = new ImageInfo("test.tiff");
         info.setPage("50x50+0+0");
    info.setUnits(ResolutionType.PixelsPerInchResolution);
    info.setColorspace(ColorspaceType.RGBColorspace);
    info.setBorderColor(PixelPacket.queryColorDatabase("red"));
         MagickImage image = new MagickImage(info);
         byte[] blob = image.imageToBlob(info);
         image.setMagick("GIF");
    blob = image.imageToBlob(info);
    try {
    FileOutputStream out = new FileOutputStream("blob.gif");
    out.write(blob);
    out.close();
    catch(IOException ex) {
    System.out.println("Unable to write blob to file: " + ex);
         }catch(Exception e){
         System.out.println("errors..."+e);
         ImageInfo info = new ImageInfo("test.tiff");
         MagickImage image = new MagickImage(info);
         image.setFileName("MyFile.png");
    image.writeImage(info);
    Please help me, its very necessary for me, I need only with JMagick, not with JIMI or JAI.
    Thanks

    Hi I posted a little bit wrong in my coding.... sorry...
    Hi,
    I am new to Graphics. Can someone help me in writing a java code to convert from TIFF to GIF using Image Magic (JMagick).
    I tried it, i compiled successfully, but I am unable to run the code. I have JMagick.jar in my classpath.
    When I am running, I am getting the following Exceptions:
    Exception in thread "main" java.lang.NoClassDefFoundError: Test (wrong name: test/Test)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    following is the code i used.
    package test;
    import java.awt.Dimension;
    import java.awt.Rectangle;
    import magick.ImageInfo;
    import magick.MagickImage;
    import magick.MagickException;
    import magick.QuantizeInfo;
    import magick.ColorspaceType;
    import test.MagickWindow;
    import magick.MagickApiException;
    import magick.PixelPacket;
    import magick.DrawInfo;
    import magick.ResolutionType;
    import magick.ProfileInfo;
    import magick.MontageInfo;
    import magick.Magick;
    import magick.MagickInfo;
    import java.io.IOException;
    import java.io.FileOutputStream;
    import java.lang.*;
         public class Test {     
         public static void main(String[] args) throws Exception
         try {
         ImageInfo info = new ImageInfo("test.tiff");
         info.setPage("50x50+0+0");
    info.setUnits(ResolutionType.PixelsPerInchResolution);
    info.setColorspace(ColorspaceType.RGBColorspace);
    info.setBorderColor(PixelPacket.queryColorDatabase("red"));
         MagickImage image = new MagickImage(info);
         byte[] blob = image.imageToBlob(info);
         image.setMagick("GIF");
    blob = image.imageToBlob(info);
    try {
    FileOutputStream out = new FileOutputStream("blob.gif");
    out.write(blob);
    out.close();
    catch(IOException ex) {
    System.out.println("Unable to write blob to file: " + ex);
         }catch(Exception e){
         System.out.println("errors..."+e);
    Please help me, its very necessary for me, I need only with JMagick, not with JIMI or JAI.
    Thanks

  • Cannot import still image: jpeg/tiff/png/gif/ai/psd

    Hello all:
    I'm running into a strange error. No matter what size image I try, I cannot seem to import a still image into Adoe Premiere Pro cs4 running on Mac OSX 10.6.2
    The error I receive is a "File Import Error: File Video Dimensions width/height too large."
    I've tried the following to isolate why Premiere is returning this error:
    - importing images at different sizes: 100x200, 1000x2000 etc
    - saving the image as different file formats: jpeg, tiff, gif, png etc
    - importing it as an illustrator file
    - importing it as a Photoshop file
    None of that worked. I'm at my wit's end and I can't seem to find anybody that has experienced this error before.

    Here are some threads to check:
    http://forums.adobe.com/thread/387776
    http://forums.adobe.com/thread/480381
    http://forums.adobe.com/thread/387156
    http://forums.adobe.com/thread/443138
    IIRC, the third one is for the Mac, but might be useful info in all.
    Good luck,
    Hunt
    PS - welcome to the forum

  • Tiff to jpeg conversion question

    Need help.  I created a .tif file by scanning an image using VueScan software.  It is rather large, too large to send via email.  I opened it in PSE 9 and tried to save it as a jpeg in order to make it a small enough file to email.  When I do a "save as", PSE 9 does not give me the option of saving as jpeg.  Any suggestions?  I need the large tiff file for archiving purposes, so I am working with a duplicate.
    Robert

      Possibly the tiff is 16 bit.
    In Full Edit click Image à Mode à 8 Bit/channel
    Then save as jpeg.
     

  • Jpeg to gif conversion

    Hi;
    I want to convert jpef or png images to gif format, but I have a problem.I'm using a gif encoder and normally I can convert jpeg files to gif files when jpeg files are 256 colors.
    When I try to convert 65000 or more coloured jpeg or png files it gives error and said gif files can not contain more than 256 colors.
    How can I change the loaded images color?Decrease to 256?
    Regards
    Murat

    A gif can only have 256 colors, trying to put more colors in it is an error.
    If you want more colors use png.
    Converting a jpeg to a gif is normally a bad idea. Gif and png compress drawing good, but photos bad, jpeg is the opposite.
    So gif->jpeg normally gives you a file that is a lot bigger for the same quality.

  • Losing metadata after TIFF to JPEG conversion in Image Processor

    When I use Image Processor to convert TIFF to JPEG for my images I am losing metadata information placed in the Properties section of my image file (PC). Is there a work-around for this so that the information isn't lost? Any idea why this is happening?

      Possibly the tiff is 16 bit.
    In Full Edit click Image à Mode à 8 Bit/channel
    Then save as jpeg.
     

  • Tiff to jpg conversion

    I'm using Adobe Photoshop Album Starter Edition 3.0. I've had the camera for only 2 days now. I've downloaded quite a few pictures off of it and it is saving them as tiff files. For the purpose of me downloading the pictures to my camera, I need them in Jpg, is there any way to use Photoshop to change the file type, and if so how?

    Colin, from the posts I found, the instructions you had were to uninstall Canon (done), uninstall photoshop (done) and reinstall photoshop (done). I initially removed the Canon software last week and have rebooted several times since then. Nothing related to Canon shows up in Add/Remove. When I reconnected the camera, the Canon Twain driver window popped up.
    At this point, I am about to give up. I removed PSSE again, and reinstalled Canon Zoombrowser because I needed the files in jpg format. I wonder if the twain driver is somehow installed in the camera itself and runs each time the camera is connected?
    Any assistance you can provide would be great. I really like the print capabilities of PSSE, and since we use it here in the office, I've got several people trained in using it. Hate to switch gears now.

  • Where find tools to import images tiff, jpeg, gif, bmp, etc.

    Hi, im trying to import images to my raster tables, but can't find some tool to do this, Somebody knows some?
    Mapviewer support view images in format TIFF?
    What formats support importFrom tool of PL/SQL?

    Hi,
    Oracle Mapbuilder can import images.
    See in menu Tools --> Import Image.
    Yes, can import TIFF.
    Miguel

  • TIFF to RAW Conversion

    I work with Lightroom 2.5 and DNG (RAW) pictures from my Pentax K20D camera.  I am not happy with the Noise Reduction in LR (especially for many slides I have scanned with a Nikon dedicated film scanner).  Therefore, I would like to use a better program (perhaps Noise Ninja) to perform noise reduction, before I use Lightroom for further developments and exports.  I believe that the noise reduction programs work with only non-RAW files.  Would I lose significant image information if I convert my DNGs to 16-bit uncompressed TIFFs for noise reduction in another program, Save As "noise-reduced" 16-bit uncompressed TIFFs, and then convert these TIFFs back to DNG before importing them into LR?  What other work-arounds can you suggest if I cannot do Noise Reduction of RAW files in other programs?
    Thanks in advance, Paul.

    If you hadn't purchased NN yet, I'd compare it first to Topaz, Neat Image and
    Noiseware. And yes, it's easy to get noise when trying to open up a slide that has a good amount of contrast.
    I'd call noise in scanning rather normal. It is certainly some thing that needs to be looked at. It has the same quality of low exposure on color neg film where there was plenty of color noise in the black of poorly exposed c41. ACR in either LR or PS has not been shared with developers, so that is why the noise reduction can not be applied to RAW files within the pipeline of the non destructive world.
    Best may not be the same from shooter to shooter or scan to scan, so while some time the first thing you can do is very basic adjustments in ACR and then  export as tif. You really need to run your own tests.

  • TIFF to DNG conversion - how?

    I have the Lightroom 3 Beta and i tried to convert 16-bit TIFF files to DNG. It says that it's not possible. Why is that? I really want to use the excellent compression capabilities of the DNG format. Any useful insights on this issue?
    Thanks,
    jj

    DNG files are themselves TIFF files, with the compression method as a speciality. There are many other aspects relating to a "negative" image, which are not present in normal TIFF files, but the format is still TIFF.
    You mentioned the excellent compression capabilities of the DNG format. The compression method used in the "standard DNG" is the one of the original lossless JPEG encoding, which is a pretty useless method on its own, it has been effectively dropped already. However, it turned out to be an excellent method for the non-demosaiced data if used abusively. You would not be very happy with this method if you used it on demosaiced data.
    Gabor

  • SAP XI Conversion Agent and TIFF

    Hello All,
    Can anyone let us know whether SAP SCript format can be converted into TIFF extension using Conversion Agent.
    Thanking you in advance
    Regards
    Ajay

    Hi,
    See for converting the EDI XML to EDI you need to have a mapping program at the adapter module which does the conversion. For this module you need a BIC tool of seeburger which provides the different module program for EDI to XML and XML-EDI. This program needs to be deployed on XI and through adapter it has to be called for conversion.
    Here is the link for your reference:
    /people/ricardoandres.maienza/blog/2007/04/06/edifact-to-xml--stylus-studio-solution
    http://www.stylusstudio.com/edi/EDIFACT_translate.html
    The steps to convert EDI to XML / XSD can be found at the following link:
    http://www.stylusstudio.com/edifact_to_xml.html
    Stylus studio download link: http://www.stylusstudio.com/xml_download.html
    Thanks and Regards,
    Chirag Gohil

  • Toolkit.createCustomCursor(...) blocks when provided with an animated GIF

    Hi everyone:
    Here is a code snippet from an application of mine:
    // Loading an image: works fine. duke.gif is an animated Duke icon found in the source code version of J2SDK 1.3.1.
    ImageIcon imageIcon = new ImageIcon("duke.gif");
    // Conversion into an image: works fine too. I checked its proper termination with a MediaTracker, which I removed after determining that getImage() does not block at all.
    Image image = imageIcon.getImage();
    // This method blocks forever!
    Cursor myCursor = Toolkit.getDefaultToolkit.createCustomCursor(image, new Point(0, 0), "Duke");After testing with a few other GIF images, I could determine that this blocking problem seems to occur only with animated GIF images. Are animated GIFs supported as cursor images at all? Also, what is the best method to use the Toolkit.getBestCursorSize(...) to properly size the loaded image for use as a cursor icon?
    Thanks in advance for helping...
    Jean-Fran�ois Morin

    I think the problem may be that your using an animated gif. If you read the doc on the Curson class it says that Cursor is a bitmap representation of the mouse cursor. Bitmaps do not generally support animation. Also it is likely the createCustomCursor method is waiting for a call to ImageConsumer.imageComplete(). I am not sure, but if the GIF animation loops this function may never get called. This could cause your hangup. I would suggest trying a non-animated GIFf produced from the same program to ensure that your paint program is producing compliant GIFs. If that works I would assume the problem is that Cursor does not support animation at this time. I could be wrong about that, but there is nothing in the documentation to indate that it would.
    NoOneLeft

  • Black pixels in animated gif??

    Hi, I've got this game where I use gif's in a loop to make animations, what I don't understand though is when I use small animations they work fine but when I use bigger animations at the end of the animation a black stripe starts to form at the bottom of the image that grows bigger. Also it waves at little at the top of the black rectangle. I thought this was very strange, the images work normally when opened with any image viewing program. They even work in java but not when displayed in a long animation.
    Does anyone know why this happens and if there is a way around this?
    thnx
    Message was edited by:
    Jeebe

    Hunt,
    That's a very nice tutorial, not to mention an elegant way to handle slides with different aspect ratios. I've run into that problem myself, and always just cropped as needed using a plain black background. The "frames" around the photos were also a nice touch.
    I looked at the source code for your response and saw how you embedded that video using JavaScript. Looked around online, and found Adobes "official" script, along with an exhaustive explanation of all the parameter settings at: http://kb2.adobe.com/cps/127/tn_12701.html
    Adobe claims 98% penetration for Flash Player, so that's pretty good and makes it a fine choice for streaming videos, given all the clutter and extra baggage you get using YouTube. I will definitely give it a try. Thanks!
    By the way, I think I figured out where those ghosts in the animated GIF were coming from. I went back into Premiere, exported the entire project as an uncompressed avi, and it played just fine with no ghosting. So I imported it into Premiere as a new project, did the export as animated GIF, and the ghosting was back.
    I can only conclude that the GIF conversion process itself is flawed. Probably something with the way it parses the content, and shows up most when you have transitions with high contrast background and text. I guess it's time for the animated GIF to go the way of the floppy disc.
    Thanks again for your help. If any forum member searchs for "animated + GIF + ghosting" they'll find this thread, and we'll have hopefully saved them some time figuring out why it's happening.
    Dan Heim

  • How to display TIFF images?

    Hello all.
    My web application needs tiff images viewer with a very primitive functionality like zoom. I'm a new in working with graphics and it seems like java.awt.image package doesn't support TIFF images format. From searching this forum I understood there are 3 party products like JAI to work with those images.
    Can somebody send me an example of how to read and display those images with zooming option; and/or how to convert from tiff to GIF/JPG formats (which also can be a solution for me).
    If somebody has a ready applet that implements the required functionality and can share it with me, I would appreciate it very much.
    Email: [email protected]
    Thanks in advance.

    I am also looking for Tiff Image zooming functionality. Please through your ideas or suggestions. I will appreciate your advises. If anyone has developed API, Please let me know, I am ready to look in to it. I will appreciate your quick response.

  • Changing the LiveCycle ES4 Launch Pad Output Folder for PDF Conversion

    I have an instance of Adobe Live Cycle ES4 on WebSphere installed on a Windows 2008 R2 server. We're leveraging the Launch Pad desktop GUI as a PDF conversion tool for our end users. The document to PDF conversion functionality is working great but the converted PDF files are automatically being stored on the end user's "AcrobatHub" folder. Example: C:\Users\Jsmith\AcrobatHub. 
    How do I modify and change the default output location for converted PDFs?

    Here is a sample for Tiff to PDF conversion using watched folder : http://help.adobe.com/en_US/livecycle/9.0/samples/ServiceUsageSamplePDFGenConvertTiffToPDF .html
    Thanks,
    Wasil

Maybe you are looking for