• 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
Rép : Problem of resolution with JPEGs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rép : Problem of resolution with JPEGs


  • Subject: Rép : Problem of resolution with JPEGs
  • From: Arthur VIGAN <email@hidden>
  • Date: Tue, 15 Mar 2005 03:23:00 +0100

Sorry, I forgot to tell: the ratio is just a float used to scale the image on the screen. For testing purpose, it is equal to 1.0

The problem is that the image is drawing the same as before.

At 1:46 PM -0800 3/14/05, Arthur VIGAN <email@hidden> wrote:
I tried this:

     NSImageRep	*rep=[[currentImage representations] objectAtIndex:0];

     ratio=[tempImage ratio];
     [currentImage
drawInRect:NSMakeRect(bounds.size.width/2.0-
center.x*ratio,bounds.size.height/2.0-center.y*ratio,[rep
pixelsWide]*ratio,[rep pixelsHigh]*ratio)
                     fromRect:NSMakeRect(0.0,0.0,[rep pixelsWide],[rep
pixelsHigh])
                    operation:NSCompositeSourceOver
                     fraction:1.0];

Instead of:

     NSSize		size=[currentImage size];

ratio=[tempImage ratio];
[currentImage
drawInRect:NSMakeRect(bounds.size.width/2.0-
center.x*ratio,bounds.size.height/2.0-
center.y*ratio,size.width*ratio,size.height*ratio)
fromRect:NSMakeRect(0.0,0.0,size.width,size.height)
operation:NSCompositeSourceOver
fraction:1.0];


But it doesn't work...

Since you don't say what the "ratio" method does, I can't say whether that might be affecting the output. Is it possible that the ratio method was updated too and is undoing the affects of using the pixel dimensions?

Also, in what way is it failing? Is it drawing the same as before, or
is it not drawing at all?

Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<http://www.buena.com/>
Video, Image and Audio Processing Development

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: Can't launch carbon XEmacs
  • Next by Date: NSNumber & C data types
  • Previous by thread: Re: Building NSObject question/Help
  • Next by thread: NSNumber & C data types
  • Index(es):
    • Date
    • Thread