• 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
Re: Thumbnails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thumbnails


  • Subject: Re: Thumbnails
  • From: Keith Wilson <email@hidden>
  • Date: Mon, 20 Mar 2006 23:03:54 +1100

I do not know the "best" way but here is a way that works

if(!thumbNailImage)
thumbNailImage = [[NSImage alloc] init];
[thumbNailImage setSize:rclThumbNail.size];
[thumbNailImage setScalesWhenResized:YES];
[thumbNailImage lockFocus];
[[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationHigh];
[originalImage drawInRect:rclThumbNail fromRect:rclCrop operation:NSCompositeCopy fraction:1.0];
[thumbNailImage unlockFocus];
NSData *tnData = [thumbNailImage TIFFRepresentation];


Keith

On 20/03/2006, at 10:24 PM, Valerio Ferrucci wrote:

Does someone know which is the best way to obtain a thumbnail from an image?

==================================================================
Valerio Ferrucci                        Tabasoft Sas
email@hidden                    http://www.tabasoft.it


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


This email sent to email@hidden

_______________________________________________ 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
References: 
 >Re: NSOutlineView selectedRow error? (From: Greg Herlihy <email@hidden>)
 >Re: NSOutlineView selectedRow error? (From: Scott Harper <email@hidden>)
 >Thumbnails (From: Valerio Ferrucci <email@hidden>)

  • Prev by Date: NSConnection; serving a class in-process / crossing thread boundary
  • Next by Date: Crash in NSOpenPanel
  • Previous by thread: Thumbnails
  • Next by thread: Re: Thumbnails
  • Index(es):
    • Date
    • Thread