DESPERATE Image compression help needed!

Hi,
im doing image compression techniques for my final year project and desperatly need some code written in java to compress a image file using the huffman code. im using the BufferedImage class to store the image (jpeg) and need a a bit more code to do the huffman coding! i have tried most places on the net, but all they do is describe what it is! not how it is implemented!
Thanks!

If you are talking about just huffman coding, then it is pretty easy. However, if you are talking about writing a JPEG compression algorithm, it's not so easy. You have to take into consideration the sampling of Y to Cr and Cb, the quantization values, the huffman tables, headers, # of components, etc...
Here are some links:
http://www.cs.sfu.ca/undergrad/CourseMaterials/CMPT479/material/notes/Chap4/Chap4.2/Chap4.2.html
http://archive.dstc.edu.au/RDU/staff/jane-hunter/video-streaming.html
http://www.cs.sfu.ca/CourseCentral/365/li/material/notes/Chap3/Chap3.3/Chap3.3.html
http://memory.loc.gov/ammem/pictel/mddp308.htm
http://www.faqs.org/faqs/jpeg-faq/
http://www.webreference.com/dev/graphics/compress.html
http://vip.cs.utsa.edu/classes/cs1723s2000/robbins/recitations/HuffmanCaseStudy.html
http://www.compressconsult.com/huffman/
http://www.wotsit.org/
http://xarch.tu-graz.ac.at/home/rurban/news/comp.graphics.algorithms/msg00050.html
http://cvs.bioperl.org/cgi-bin/viewcvs/viewcvs.cgi/biojava-lims/third/JpegEncoder/JpegEncoder.java?cvsroot=biojava&rev=HEAD
http://www.montefiore.ulg.ac.be/~briquet/imgsvr/JPEG.java
The last two links provide implementations. I think the last link is probably the simplest
implementation I've ever seen for JPEG. It works, but it's not great :)

Similar Messages

  • Site linked on facebook has no thumbnail image - Admin. help needed

    hi, after looking thru the forum i've found 3 different posts asking how to make links posted on facebook come up with an appropriate thumbnail image, but none of them have an answer. Is it possible for a site built with iweb to do this, and if so, please tell us how. Thanks

    The only solution is to write a piece of code into the header of the page and that will tell facebook where to pull the title, description and the photo from. The code that needs to be inserted is below.
    THE PROBLEM - this solution doesn't work if you have built your site using iweb. Everyone that has iweb has responded to the solution (everywhere this is written about) has said this.
    Does anyone know another work around?
    The solution for anyone without iweb:
    <meta name="title" content="INSERT CONTENT HERE" />
    <meta name="description" content="INSERT CONTENT HERE" />
    <link rel="image_src" href="INSERT LOCATION OF PHOTO WEB ADDRESS HERE" />

  • Please help - image viewer help needed

    hi
    can anyone plase help
    I am building a CSS site and want a simple image viewer -
    just one image viewing in a box with >> and << buttons
    for the user to scroll through images. I know that dreamweaver has
    a built in Image viewer but it does not work properly. It will not
    go back to the first image after it has gone forward to the next
    images. Even the tutorial does this.
    Does anyone know why this happens or can anyone direct me to
    a good tutorial that will provide instructions for this?
    I know that there are many add ons to deal with this but it
    is only a small function that I should be able to produce myself.
    Many Thanks

    If you're building a CSS site you might not want to use
    Flash. Try Googling
    for "lightbox". If you have a development budget, you might
    also want to
    have a look at this:
    http://www.projectseven.com/products/galleries/ssm/ssm_01.htm
    Al Sparber - PVII
    http://www.projectseven.com
    Extending Dreamweaver - Nav Systems | Galleries | Widgets
    Authors: "42nd Street: Mastering the Art of CSS Design"
    "sarah louise water" <[email protected]>
    wrote in message
    news:fhocso$61t$[email protected]..
    > hi
    > can anyone plase help
    >
    > I am building a CSS site and want a simple image viewer
    - just one image
    > viewing in a box with >> and << buttons for
    the user to scroll through
    > images.
    > I know that dreamweaver has a built in Image viewer but
    it does not work
    > properly. It will not go back to the first image after
    it has gone forward
    > to
    > the next images. Even the tutorial does this.
    >
    > Does anyone know why this happens or can anyone direct
    me to a good
    > tutorial
    > that will provide instructions for this?
    > I know that there are may add ons to deal with this but
    it is only a small
    > function that I should be able to produce myself.
    >
    > Many Thanks
    >

  • Image sequence help needed

    Hi people, first time posting, spent a while researching nobody seems to have covered this as far as i looked. I am dealing with about 1200 images in flash, in sequence, i tried importing the frames all at once and they all came up blank... for some reason they were red up until 315 and then the rest were blank, some were black. People have said that it is likely a ram issue? what the hell? the images total just under a half a gig and i have 8gb of ram, i looked at my processes and flash is only using about 3gb of ram. I tried importing about 100 images at a time, and i got to about 300 and again, the same issue started, after seeing them all work up to 300. I need to be able to take out a frame here or there from a video. I hope i need not exaplin more, the point is i need this image sequence to work, and i need to be able to see all 1200 frames and it simply is not working for me. Any solutions? flash has been driving me nuts lately.

    This is a known limitation in Flash. Do note that the size of the image on the filesystem may say something like half a gig but once you take it into Photoshop you'll see the uncompressed actual size of the image (on the bottom of each window). For example a 52KB JPEG in Photoshop right now states it's 950.2K. I'm assuming your images are probably larger so you can quickly see how this becomes an issue. Open 700 52kb images and you're sitting at 7GB ram, 1GB for the OS and are now in pagefile (HD ram).
    Flash is about being light weight. After Effects would sequence those images like nothing but Flash is not designed like that.
    The solution depends on your needs. Why are you importing 1200 frames individually? If the frames make up a video (or several videos) you should create them in an actual video while saving huge amounts of disk space and processor, while also getting around this Flash limitation.

  • Image Selection Help Needed

    Hi
    i am trying to select my inline graphic after it is added to textflow.
    using filerefrence once image is loaded and following funcion is to handle this
    function imageLoadComplete(e:Event):void {
         imgLdr.contentLoaderInfo.removeEventListener(Event.COMPLETE,imageLoadComplete);
         var mc:MovieClip = new MovieClip();
         mc.addChild(imgLdr.content);
         mc.addEventListener(MouseEvent.CLICK,imageClicked);
         EditManager(textFlow.interactionManager).insertInlineGraphic(mc,100,100);
         textFlow.flowComposer.updateAllContainers();
    when i click on image event is called. after click i passed this image to resize handler and here is to resize this. but it handles  image only if cursor is at side of the image or image is selected in a way that it is highlighted. other wise modifyinlinegraphic is not working for me if i pass my movieclip refrence.
    Please help i have spen more than 10 hrs to figure out this problem
    Thanks

    I think most likely the problem is that you are not passing an explicit operationState. That is the last parameter in EditManager.modifyInlineGraphic, and if it is left out, then TLF will use the current selection as the location of the inline graphic. If you want to modify an inline graphic at a particular location, you should create a SelectionState at that location, and pass that as the operationState.
    Suppose the inline is the first thing in the TextFlow. Then you could do this as follows:
         var selectionState:SelectionState = new SelectionState(textFlow, 0, 0);
         IEditManager(textFlow.interactionManager).modifyInlineGraphic("source", 100, 100, null, selectionState);
    Then it should find the inline graphic at the start of the TextFlow, regardless of where the current selection is.
    If this does not sound like the problem you are having, please send a code snippet for the event listener where you call to modifyInlineGraphic.
    - robin

  • Missing images error. help needed

    Hey,
    Since i had an issue with having iPhoto library on Airport, i moved it back and rebuilt library etc.
    All is fine but there are about five photos that have been lost which is fine.
    I dont mind the loss of these photos, but id like to get rid of these error messages.
    Please see screenshot attached.
    S

    "copy imported items to the iPhoto library" is checked.
    It wasn't when these files were imported.
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.

  • Help Needed..Fingerprint Identification..Image Manipulation

    Norfolk State University Student (Help Needed):
    I'm working on Fingerprint Identification using image correlation and/or a feature-based approach.  First, Goal is to minimize the lines of the minutia so that they are one pixel thick.  What services does Labview offer that will help me accomplish this task??

    Hey Snakehead...,
    Have you tried improving your original image with better lighting, better camera, better lens, etc.? What image processing have you done already, or are you starting from scratch? I agree with AnalogKid in providing some sample images to the forum so we can get an idea of what you are working with. Have you performed any morphology processing on the image? Have you tried edge detection functions? There are numerous functions that NI provides with their NI Vision software that will help you process your image, it is just finding the right combination that is the toughest part. Last, if you do have the Vision software, I might suggest taking a look at the Vision concepts manual to get an idea of the different functions and their capabilities. Let us know what kind of images you are working with and what you have done so far, and last, what you would like to eventually see. Thanks, and have a great day.
    Regards,
    DJ L.

  • Help needed placing extra images in my portfolio.

    I like to add some more pictures by my portfoliomap.
    I have now 6 items each page and i like to know if its possible to add some more pictures and how i can do this?
    You can find my site at..
    http://www.dorffdesign.nl/affiches.html

    As you can see on
    http://www.dorffdesign.nl/advertenties.html
    it worked out fine..
    Only the last set off images contait to much space between the set before? Do you know where i can adjust this?
    Regards Brian
    Date: Tue, 17 Apr 2012 09:07:38 -0600
    From: [email protected]
    To: [email protected]
    Subject: Help needed placing extra images in my portfolio.
        Re: Help needed placing extra images in my portfolio.
        created by Altruistic Gramps in Dreamweaver - View the full discussion
    Upload the images to the images folder and use the markup as you have been using in the following, changing the name of the image to suit.
    !images/arcadisch_logo.jpg|alt=|src=images/arcadisch_logo.jpg!
    Gramps
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4340979#4340979
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4340979#4340979. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Dreamweaver by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • I would like to remove a short gray edge from two images. I need help in that I am not yet able to use PhotoShop. Could somebody kindly help me with this?

    I would like to remove a short gray edge from two images. I need help in that I am not yet able to use PhotoShop. Could somebody kindly help me with this?

    I doubt it Doc Maik, but I am certainly happy to learn The image is this one (and a similar one). They would be beautiful portraits if not for the "extra mouth". The grey edge that I would like to remove is the excess of (grey) mouth that is actually my horse's chin, but that in the pictures looks like a wider, looping mouth. Practically, looking at the picture, the "extra mouth" to the left. What I would love it to be able correct that to look like a normal mouth, which means that half of the protruding edge should be removed. I am not sure I was able to explain myself, but here is one of the two pictures. I thank you for you kindness in being available to advise me.

  • [HELP] need TX2 recovery DVD/Image

    [HELP] need TX2 recovery DVD/Image HP won't repair it b/c i dont have the original software....can someone provide me an image or i will pay $ for DVD plz full model is TX2-1024CA

    That is a notebook PC. Maybe this document will help? http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00810334&cc=us&dlc=en&lc=en&jumpid=reg_R1002_US...
    ... an HP employee expressing his own opinion.
    Please post rather than send me a Message. It's good for the community and I might not be able to get back quickly. - Thank you.

  • Serious help needed fixing an image gallery

    On my page
    http://www.dorff.nl/clients.html
    ive put this very nice gallery..
    The only problem is. I divided the gallery in 6 groups. But in every group you will see the same images. How can i change the images for each group seperately?
    I hope you understand what i ment.
    Regards Brian

    How i can use the four files you have send me?
    In dreamweaver im getting the message...
    lightbox.css is not on the disk
    prototype.css is not on the disk
    scriptaculous.css is not on the disk
    lightbox.js is not on the disk
    Date: Thu, 12 Apr 2012 12:37:39 -0600
    From: [email protected]
    To: [email protected]
    Subject: serious help needed fixing an image gallery
        Re: serious help needed fixing an image gallery
        created by adninjastrator in Dreamweaver - View the full discussion
    Here are 4 files you need:http://www.olympicdiscoverytrail.com/style_sheets/lightbox.csshttp://www.olympicdiscoveryt rail.com/style_sheets/prototype.jshttp://www.olympicdiscoverytrail.com/style_sheets/script aculous.js?loa d=effectshttp://www.olympicdiscoverytrail.com/style_sheets/lightbox.jsHere is an entire web page with working multiple galleries:
    Photo Gallery 1
        !images/125/paw_Carrie-Elwha.jpg|title=Elwha River Valley approaching the bridge|height=93|alt=Elwha River Valley approaching the bridge|width=125|src=images/125/paw_Carrie-Elwha.jpg|border=0!
    Photo Gallery 2
        !images/125/sw_IMG_1115-Downtown-Trail.jpg|title=Trail near High School close to downtown Sequim|height=83|alt=Trail near High School close to downtown Sequim|width=125|src=images/125/sw_IMG_1115-Downtown-Trail.jpg|border=0!
       </div>     <!-- close main_container -->
    </div>
    </body>
    </html>Here is a link to that working page on-line:http://www.olympicdiscoverytrail.com/trail_maps/slideshow.htmlThere is not much more I can do!You'll have to take the bull by the horns and start coding!Copy/Paste this HTML code into a new, blank page and edit the paths to all the .css, .js, and image files.Best of luck!Adninjastrator
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4330648#4330648
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4330648#4330648. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Dreamweaver by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Hi help needed. Just updated my I phone 4 for first time since I bought it (I know, I know). Lost everything. What I really want back is my notes. Any ideas. Please. Somewhat desperate!!!!

    Help needed. Just updated my I phone 4 and lost all my notes, and no I didn't put them in the I cloud. Please help. Need those notes!

    You could always check to make sure itunes is updated to 10.7 but im sure gdgmacdude is
    right.
    thanks
    gdgmacdude
    Hey dude
    are there anymore hardware failure errors u know of
    im kinda a novice apple man and could use all the help i can get
    capp

  • Help needed:Printing HTML file using javax.print

    Hi
    I am using the following code which i got form the forum for rpinting an HTML file.
    The folllowing code is working fine, but the problem is the content of HTML file is not getting printed. I am geeting a blank page with no content. What is the change that is required in the code? ALso is there any simpler way to implement this. Help needed ASAP.
    public boolean printHTMLFile(String filename) {
              try {
                   JEditorPane editorPane = new JEditorPane();
                   editorPane.setEditorKit(new HTMLEditorKit());
                   //editorPane.setContentType("text/html");
                   editorPane.setSize(500,500);
                   String text = getFileContents(filename);
                   if (text != null) {
                        editorPane.setText(text);                    
                   } else {
                        return false;
                   printEditorPane(editorPane);
                   return true;
              } catch (Exception tce) {
                   tce.printStackTrace();
              return false;
         public String getFileContents(String filename) {
              try {
                   File file = new File(filename);
                   BufferedReader br = new BufferedReader(new FileReader(file));
                   String line;
                   StringBuffer sb = new StringBuffer();
                   while ((line = br.readLine()) != null) {
                        sb.append(line);
                   br.close();
                   return sb.toString();
              } catch (Exception tce) {
                   tce.printStackTrace();
              return null;
         public void printEditorPane(JEditorPane editorPane) {
                   try {
                        HTMLPrinter htmlPrinter = new HTMLPrinter();
                        htmlPrinter.printJEditorPane(editorPane, htmlPrinter.showPrintDialog());
                   } catch (Exception tce) {
                        tce.printStackTrace();
         * Sets up to easily print HTML documents. It is not necessary to call any of the setter
         * methods as they all have default values, they are provided should you wish to change
         * any of the default values.
         public class HTMLPrinter {
         public int DEFAULT_DPI = 72;
         public float DEFAULT_PAGE_WIDTH_INCH = 8.5f;
         public float DEFAULT_PAGE_HEIGHT_INCH = 11f;
         int x = 100;
         int y = 80;
         GraphicsConfiguration gc;
         PrintService[] services;
         PrintService defaultService;
         DocFlavor flavor;
         PrintRequestAttributeSet attributes;
         Vector pjlListeners = new Vector();
         Vector pjalListeners = new Vector();
         Vector psalListeners = new Vector();
         public HTMLPrinter() {
              gc = null;
              attributes = new HashPrintRequestAttributeSet();
              flavor = null;
              defaultService = PrintServiceLookup.lookupDefaultPrintService();
              services = PrintServiceLookup.lookupPrintServices(flavor, attributes);
              // do something with the supported docflavors
              DocFlavor[] df = defaultService.getSupportedDocFlavors();
              for (int i = 0; i < df.length; i++)
              System.out.println(df.getMimeType() + " " + df[i].getRepresentationClassName());
              // if there is a default service, but no other services
              if (defaultService != null && (services == null || services.length == 0)) {
              services = new PrintService[1];
              services[0] = defaultService;
         * Set the GraphicsConfiguration to display the print dialog on.
         * @param gc a GraphicsConfiguration object
         public void setGraphicsConfiguration(GraphicsConfiguration gc) {
              this.gc = gc;
         public void setServices(PrintService[] services) {
              this.services = services;
         public void setDefaultService(PrintService service) {
              this.defaultService = service;
         public void setDocFlavor(DocFlavor flavor) {
              this.flavor = flavor;
         public void setPrintRequestAttributes(PrintRequestAttributeSet attributes) {
              this.attributes = attributes;
         public void setPrintDialogLocation(int x, int y) {
              this.x = x;
              this.y = y;
         public void addPrintJobListener(PrintJobListener pjl) {
              pjlListeners.addElement(pjl);
         public void removePrintJobListener(PrintJobListener pjl) {
              pjlListeners.removeElement(pjl);
         public void addPrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.addElement(psal);
         public void removePrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.removeElement(psal);
         public boolean printJEditorPane(JEditorPane jep, PrintService ps) {
                   if (ps == null || jep == null) {
                        System.out.println("printJEditorPane: jep or ps is NULL, aborting...");
                        return false;
                   // get the root view of the preview pane
                   View rv = jep.getUI().getRootView(jep);
                   // get the size of the view (hopefully the total size of the page to be printed
                   int x = (int) rv.getPreferredSpan(View.X_AXIS);
                   int y = (int) rv.getPreferredSpan(View.Y_AXIS);
                   // find out if the print has been set to colour mode
                   DocPrintJob dpj = ps.createPrintJob();
                   PrintJobAttributeSet pjas = dpj.getAttributes();
                   // get the DPI and printable area of the page. use default values if not available
                   // use this to get the maximum number of pixels on the vertical axis
                   PrinterResolution pr = (PrinterResolution) pjas.get(PrinterResolution.class);
                   int dpi;
                   float pageX, pageY;
                   if (pr != null)
                        dpi = pr.getFeedResolution(PrinterResolution.DPI);
                   else
                        dpi = DEFAULT_DPI;
                   MediaPrintableArea mpa = (MediaPrintableArea) pjas.get(MediaPrintableArea.class);
                   if (mpa != null) {
                        pageX = mpa.getX(MediaPrintableArea.INCH);
                        pageY = mpa.getX(MediaPrintableArea.INCH);
                   } else {
                        pageX = DEFAULT_PAGE_WIDTH_INCH;
                        pageY = DEFAULT_PAGE_HEIGHT_INCH;
                   int pixelsPerPageY = (int) (dpi * pageY);
                   int pixelsPerPageX = (int) (dpi * pageX);
                   int minY = Math.max(pixelsPerPageY, y);
                   // make colour true if the user has selected colour, and the PrintService can support colour
                   boolean colour = pjas.containsValue(Chromaticity.COLOR);
                   colour = colour & (ps.getAttribute(ColorSupported.class) == ColorSupported.SUPPORTED);
                   // create a BufferedImage to draw on
                   int imgMode;
                   if (colour)
                        imgMode = BufferedImage.TYPE_3BYTE_BGR;
                   else
                        imgMode = BufferedImage.TYPE_BYTE_GRAY;
                   BufferedImage img = new BufferedImage(pixelsPerPageX, minY, imgMode);
                   Graphics myGraphics = img.getGraphics();
                   myGraphics.setClip(0, 0, pixelsPerPageX, minY);
                   myGraphics.setColor(Color.WHITE);
                   myGraphics.fillRect(0, 0, pixelsPerPageX, minY);
                        java.awt.Rectangle rectangle=new java.awt.Rectangle(0,0,pixelsPerPageX, minY);
                   // call rootView.paint( myGraphics, rect ) to paint the whole image on myGraphics
                   rv.paint(myGraphics, rectangle);
                   try {
                        // write the image as a JPEG to the ByteArray so it can be printed
                        Iterator writers = ImageIO.getImageWritersByFormatName("jpeg");
                        ImageWriter writer = (ImageWriter) writers.next();
                                       // mod: Added the iwparam to create the highest quality image possible
                        ImageWriteParam iwparam = writer.getDefaultWriteParam();
                        iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT) ;
                        iwparam.setCompressionQuality(1.0f); // highest quality
                        ByteArrayOutputStream out = new ByteArrayOutputStream();
                        ImageOutputStream ios = ImageIO.createImageOutputStream(out);
                        writer.setOutput(ios);
                        // get the number of pages we need to print this image
                        int imageHeight = img.getHeight();
                        int numberOfPages = (int) Math.ceil(minY / (double) pixelsPerPageY);
                        // print each page
                        for (int i = 0; i < numberOfPages; i++) {
                             int startY = i * pixelsPerPageY;
                             // get a subimage which is exactly the size of one page
                             BufferedImage subImg = img.getSubimage(0, startY, pixelsPerPageX, Math.min(y - startY, pixelsPerPageY));
                                                 // mod: different .write() method to use the iwparam parameter with highest quality compression
                             writer.write(null, new IIOImage(subImg, null, null), iwparam);
                             SimpleDoc sd = new SimpleDoc(out.toByteArray(), DocFlavor.BYTE_ARRAY.JPEG, null);
                             printDocument(sd, ps);
                             // reset the ByteArray so we can start the next page
                             out.reset();
                   } catch (PrintException e) {
                        System.out.println("Error printing document.");
                        e.printStackTrace();
                        return false;
                   } catch (IOException e) {
                        System.out.println("Error creating ImageOutputStream or writing to it.");
                        e.printStackTrace();
                        return false;
                   // uncomment this code and comment out the 'try-catch' block above
                   // to print to a JFrame instead of to the printer
                   /*          JFrame jf = new JFrame();
                             PaintableJPanel jp = new PaintableJPanel();
                             jp.setImage( img );
                             JScrollPane jsp = new JScrollPane( jp );
                             jf.getContentPane().add( jsp );
                             Insets i = jf.getInsets();
                             jf.setBounds( 0, 0, newX, y );
                             jf.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
                             jf.setVisible( true );*/
                   return true;
              * Print the document to the specified PrintService.
              * This method cannot tell if the printing was successful. You must register
              * a PrintJobListener
              * @return false if no PrintService is selected in the dialog, true otherwise
              public boolean printDocument(Doc doc, PrintService ps) throws PrintException {
                   if (ps == null)
                   return false;
                   addAllPrintServiceAttributeListeners(ps);
                   DocPrintJob dpj = ps.createPrintJob();
                   addAllPrintJobListeners(dpj);
                   dpj.print(doc, attributes);
                   return true;
              public PrintService showPrintDialog() {
                   return ServiceUI.printDialog(gc, x, y, services, defaultService, flavor, attributes);
              private void addAllPrintServiceAttributeListeners(PrintService ps) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < psalListeners.size(); i++) {
                   PrintServiceAttributeListener p = (PrintServiceAttributeListener) psalListeners.get(i);
                   ps.addPrintServiceAttributeListener(p);
              private void addAllPrintJobListeners(DocPrintJob dpj) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < pjlListeners.size(); i++) {
                   PrintJobListener p = (PrintJobListener) pjlListeners.get(i);
                   dpj.addPrintJobListener(p);
              // uncomment this also to print to a JFrame instead of a printer
              /* protected class PaintableJPanel extends JPanel {
                   Image img;
                   protected PaintableJPanel() {
                        super();
                   public void setImage( Image i ) {
                        img = i;
                   public void paint( Graphics g ) {
                        g.drawImage( img, 0, 0, this );
    Thanks
    Ram

    Ram,
    I have had printing problems too a year and a half ago. I used all printing apis of java and I still find that it is something java lacks. Now basically you can try autosense. To check whether your printer is capable of printing the docflavor use this PrintServiceLookup.lookupPrintServices(flavor, aset); . If it lists the printer then he can print the document otherwise he can't. I guess that is why you get the error.
    Regards,
    Kevin

  • Iphone 6 photo image compression/ quality loss

    iPhone 6 and 6 plus have pretty remarkable cameras. But oddly, Apple doesn't seem to want you to keep the high quality images and videos you take. As soon as you email let's say a 3.5 mb photo image, you are asked what size you want to email it in and given a series of compression options. Once you make the decision the first time, that decision is permanent. Apple does not really warn you that you are about to permanently, massively compress (destroy) that original image. There should be a better way to preserve original image files. The email compression decision should impact only that email -- not the master image file. But it does.
    Also, if you take an amazing video on your iPhone 6, when you put that video in photostream or in the cloud or email it, there is no warning to you that you've just massively compressed the video. I took a video that was close to 10 mb, emailed it to myself to save it, then had to wipe my phone because of a problem. When i reinstalled and opened the video, it was about 10% of the size of the original video. Original gone. No warning.
    It's sort of odd that Apple would not think to create better menus, options and communication/guidance around image compression.
    Lastly, if you take a picture on your Iphone .. there is NO WAY to know any metadata on that image file -- unless you go to email it and you get that compressino option screen. You can't see anywhere else the image file size. Again, why make such a great camera if all you want is to massively degrade the image files the moment you do anything with them?

    Howdy elkspark,
    If your camera photos still dont look quite right, I would recommend taking a look at this info from the following article to help determine what might be causing this to happen:
    Get help with the camera on your iPhone, iPad, or iPod touch
    Your photos are blurred or out of focus
    If your photos are blurred, out of focus, or have dark spots, try these steps:
    Make sure that the camera lens is clean. If you need to clean the lens, use a microfiber cloth. If you see dirt or debris inside the lens, take your device to an Apple Retail Store or Authorized Service Provider for more help.
    Make sure that there’s nothing blocking the camera lens. If you’re using a case, try removing it.
    With iPhone 6 Plus, a metallic case or magnetic lens could interfere with optical image stabilization. If you have a metallic case or magnetic lens attachment, try taking a picture without it. Then compare the quality.
    Adjust the focus by tapping on the person or object in the preview screen. You’ll see the screen pulse or briefly go in and out of focus as the camera adjusts. In photo mode, try to stay steady when adjusting the focus. If you move too far in any direction, the camera will automatically refocus to the center. In video mode, you can adjust the focus before you begin recording.
    Thank you for using Apple Support Communities.
    Regards,
    Sterling

  • Best practices for image compression in dps

    Hi! I have been reading up on best practices for image compression in dps, and I have read that the source assets of panoramas, image sequences, pan and zoom images, and audio skins are not resampled on upload. So you therefore need to resize them and compress them before dropping them into your article, because dps doesn't do it for you. Okay can do!
    So then Im also reading that the source assets of slideshows, scrollable frames, and buttons ARE resampled as PNG images. Does this mean that DPS will compress them for you when you build the article? So does that mean I shouldn't bother going to the trouble of resizing these images at all? I can just pop in the 15mb 300dpi files used in the print magazine and dps will compress them upon building the article - and this will have no affect on file size?
    And this is also the case with static background images?
    Thanks for your help!

    All images are automatically resampled based on the size of the folio you make. You can drop in whatever resolution image you want, it doesn't matter.
    Neil

Maybe you are looking for

  • Copying photos to dvd from org.

    I am using photoshop elements 9. have  used other elements as they came out without any problems when trying to copt I select photos select copy chose dvd drive writer it asks for dvd checks and states 2 dvds and I check ok starts to copy then error

  • JDBC  URL Configuration for UDConnect in BW 3.5

    Hello, We are experiementing with UDConnect on our BW 3.5 sandbox system to try to connect to an external oracle database using JDBC.  The UDConnect configuration requires the input of the JDBC driver name, which I believe in our case is oracle.jdbc.

  • Dashboards Causing B1IF Issues

    Hi, I recently enabled dashboards and soon encountered a situation whereby the server cpu and memory were spiking. B1IF is on the same server as B1 server so people were reporting sluggish B1 client performance which was fixed once the integration se

  • Dropdown values in Web request and Adobe form.

    Hi All, I am a Abap dynpro & adobe forms developer. I have to work on a CRM project to generate Adobe forms using Web request. I could create forms submit data etc. Now came up with a requirement where I need to have dropdown in the form the source b

  • AP1522 with WLC 2106

    Hi. I want to know how to join the AP1522 to a WLC 2106. The Controller and the AP are in the network, but the AP can't be joined to the controller. What is missing?