• 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: Scaling a UIImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scaling a UIImage


  • Subject: Re: Scaling a UIImage
  • From: David Duncan via Cocoa-dev <email@hidden>
  • Date: Mon, 02 Nov 2020 15:45:47 -0800


> On Nov 2, 2020, at 3:20 PM, Carl Hoefs <email@hidden> wrote:
>
> Okay. It was my understanding that -TIFFRepresentation was the only way to
> get serializable image data bytes... What is a more efficient way to do this?

If you want serializable data bytes, sure, but thats not what you appear to be
doing in the code you sent – you appear to want a bitmap representation.
Presumably you go on to do something other than serialize it (as I imagine you
want to draw it in some way).

In general if you want something you can draw, you can get a
-CGImageForProposedRect:context:hints, and if you need an NSBitmapRep you can
use -bestRepresentationForRect:context:hints:. But assuming your trying to get
that NSImage somewhere other than into (say) an NSImageView, there may be
better APIs or pathways to that solution.

> -Carl
>
>
>> On Nov 2, 2020, at 3:09 PM, David Duncan <email@hidden
>> <mailto:email@hidden>> wrote:
>>
>> Also any code using -TIFFRepresentation for any reason other than to get
>> actual TIFF data is likely suspect. There are absolutely more efficient ways
>> to do this.
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Scaling a UIImage (From: Carl Hoefs via Cocoa-dev <email@hidden>)
 >Re: Scaling a UIImage (From: David Duncan via Cocoa-dev <email@hidden>)
 >Re: Scaling a UIImage (From: Carl Hoefs via Cocoa-dev <email@hidden>)

  • Prev by Date: Re: Scaling a UIImage
  • Next by Date: Re: Scaling a UIImage
  • Previous by thread: Re: Scaling a UIImage
  • Next by thread: Re: Scaling a UIImage
  • Index(es):
    • Date
    • Thread