Creating beautiful thumbnails
Creating beautiful thumbnails
- Subject: Creating beautiful thumbnails
- From: John Blackburn <email@hidden>
- Date: Sat, 13 Apr 2002 22:44:22 -0700
Hello,
Creating thumbnail images using Cocoa is wonderfully simple:.
thumbnailImage = [[NSImage alloc] initWithSize:thumbSize];
[thumbnailImage lockFocus];
[imageRep drawInRect:rect];
thumbnailRep = [[NSBitmapImageRep alloc]
initWithFocusedViewRect:rect];
[thumbnailImage unlockFocus];
thumbnailData = [thumbnailRep representationUsingType:NSPNGFileType
properties:nil];
This works great, but in some cases creates a pretty high-contrast
image, as though the thumbnail's been excessively sharpened in
Photoshop. I've created thumbnails using QuickTime which seem
higher-quality, and so suspect I'm missing some essential nuance in
Cocoa.
Are there any handy tips for creating the best thumbnails possible from
an image? For instance:
* Are jpegs better than pngs, or one image type superior to another?
Both jpegs and pngs look about the same when generated using the above
method.
* Can foreground/background colors subtly influence things? I
haven't found that they do.
Thank you,
John Blackburn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.