Re: Base64 encoding of NSImage
Re: Base64 encoding of NSImage
- Subject: Re: Base64 encoding of NSImage
- From: Jim Zajkowski <email@hidden>
- Date: Sun, 01 Jul 2012 13:17:06 -0400
On Sun, Jul 1, 2012 at 1:05 PM, Kyle Sluder <email@hidden> wrote:
> On Sun, Jul 1, 2012, at 11:23 PM, Alexander Hartner wrote:
>> I am looking at available option to send an NSImage to a webserver.
> If you're in control over both the client and server, I'd suggest
> avoiding sending the image data over JSON. You're going to seriously
> inflate the file size by base64-encoding it, and for what purpose?
>
> You can be REST without using JSON. It would be much more efficient if
> you could just issue a PUT at a certain URL to upload the image data.
I completely agree - don't encode it unless you're sure you really
need that, such as if your webserver were a VAX and didn't understand
8 bit character encodings. You're going to balloon the resident
memory size of the app, possibly dramatically if you're talking
arbitrary images.
--Jim
_______________________________________________
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