• 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: Base64 encoding of NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Base64 encoding of NSImage


  • Subject: Re: Base64 encoding of NSImage
  • From: Kyle Sluder <email@hidden>
  • Date: Sun, 01 Jul 2012 10:05:01 -0700

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. I
> came across gSoap however its licensing model makes it not suitable.
> Using REST / JSON seems like an easy option however NSDATA does not seem
> to be supported by the JSON Serialiser. The one remaining option I
> considered was to encode the image myself to base64 before including in
> the JSON request. This could work quite nicely, however there doesn't
> seem to be a standard method for base64 encoding.
>
> Any suggestion on how to best achieve this.

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.

--Kyle Sluder
_______________________________________________

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

  • Follow-Ups:
    • Re: Base64 encoding of NSImage
      • From: Jim Zajkowski <email@hidden>
References: 
 >Base64 encoding of NSImage (From: Alexander Hartner <email@hidden>)

  • Prev by Date: Re: Base64 encoding of NSImage
  • Next by Date: Re: Base64 encoding of NSImage
  • Previous by thread: Re: Base64 encoding of NSImage
  • Next by thread: Re: Base64 encoding of NSImage
  • Index(es):
    • Date
    • Thread