FROM : Shawn Erickson
DATE : Sat Jan 05 01:56:49 2008
On Jan 4, 2008 2:25 PM, Adam Knight <adam.<email_removed>> wrote:
> I think I'm missing something here.
>
> I need to take an image and scale it (very cleanly) down while keeping
> the metadata. The source is a JPEG file on-disk (typically from a
> digital camera). The destination is an NSData object in memory that
> is JPEG-encoded with the same metadata.
>
> I tried this using CIImage and a CILanczosScaleTransform filter then
> using NSBitmapImageRep's initWithCIImage method. This worked very
> well and made a great image, but it looks like Apple's initWithCIImage
> code leaks a whole copy of the image outside of my reach.
Consider using vImage (supports "Lanczos3" and "Lanczos5").
<http://developer.apple.com/documentation/Performance/Conceptual/vImage/vimage_geometry/chapter_6_section_2.html#//apple_ref/doc/uid/TP30001001-CH207-TPXREF103>
-Shawn
DATE : Sat Jan 05 01:56:49 2008
On Jan 4, 2008 2:25 PM, Adam Knight <adam.<email_removed>> wrote:
> I think I'm missing something here.
>
> I need to take an image and scale it (very cleanly) down while keeping
> the metadata. The source is a JPEG file on-disk (typically from a
> digital camera). The destination is an NSData object in memory that
> is JPEG-encoded with the same metadata.
>
> I tried this using CIImage and a CILanczosScaleTransform filter then
> using NSBitmapImageRep's initWithCIImage method. This worked very
> well and made a great image, but it looks like Apple's initWithCIImage
> code leaks a whole copy of the image outside of my reach.
Consider using vImage (supports "Lanczos3" and "Lanczos5").
<http://developer.apple.com/documentation/Performance/Conceptual/vImage/vimage_geometry/chapter_6_section_2.html#//apple_ref/doc/uid/TP30001001-CH207-TPXREF103>
-Shawn
| Related mails | Author | Date |
|---|---|---|
| Adam Knight | Jan 4, 23:25 | |
| Adam Knight | Jan 5, 00:45 | |
| John Stiles | Jan 5, 00:51 | |
| Chris Williams | Jan 5, 01:19 | |
| Scott Ribe | Jan 5, 01:30 | |
| Scott Ribe | Jan 5, 01:34 | |
| Shawn Erickson | Jan 5, 01:56 | |
| Adam Knight | Jan 7, 18:41 |






Cocoa mail archive

