• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
drawImage() really slow on Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

drawImage() really slow on Leopard


  • Subject: drawImage() really slow on Leopard
  • From: Miguel Arroz <email@hidden>
  • Date: Wed, 27 Feb 2008 00:37:29 +0000

Hi!

  I have the following code to downscale images:

// Do the scaling
BufferedImage reducedImage = new BufferedImage(newX, newY, BufferedImage.TYPE_INT_RGB);
Graphics2D g = reducedImage.createGraphics();
g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_SPEED);

NSLog.out.appendln("Drawing image with original dimensions " + originalImage.getWidth() + ", " + originalImage.getHeight()
+ " with size " + newX + ", " + newY ); */

g.drawImage(originalImage, 0, 0, newX, newY, 0, 0, originalImage.getWidth(), originalImage.getHeight(), null);
g.dispose();


The log is: INFO 00:27:16 (NSLog :38) -Drawing image with original dimensions 3072, 2304 with size 267, 200

This took about a second to process in my Powerbook on Tiger. I migrated to Leopard, and this is taking... well... forever. I waited several minutes and it's still sucking up my CPU. Shark says it's taking a lot of time in color conversion stuff:

PNG image



I have no ideia why. It's the same image and the same code. Only the OS has changed. Another Leopard bug?

  Any ideias?

  Yours

Miguel Arroz

Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: drawImage() really slow on Leopard
      • From: Galen Rhodes <email@hidden>
  • Prev by Date: Re: WO 5.4 / Axis 1.4 / Deserialization
  • Next by Date: Re: drawImage() really slow on Leopard
  • Previous by thread: Dragging clickable things
  • Next by thread: Re: drawImage() really slow on Leopard
  • Index(es):
    • Date
    • Thread