FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Load SIO2image from CGImage/UIImage

2 posters

Go down

Load SIO2image from CGImage/UIImage Empty Load SIO2image from CGImage/UIImage

Post  konstruktor Wed Mar 25, 2009 8:41 am

Hi guys,

A questions related to performans:

I have CGImage and want to use it as SIO2strem. Do I have to convert it to NSData and then:

Code:

      SIO2stream *_SIO2stream = sio2StreamInit( name );
      
      _SIO2stream->size = [data length];
      _SIO2stream->buf = new unsigned char [_SIO2stream->size + 1];
      [data getBytes:_SIO2stream->buf length: _SIO2stream->size];
      _SIO2stream->buf[_SIO2stream->size] = 0;
      _SIO2stream->cur = _SIO2stream->buf;
      
      SIO2image *_SIO2image = sio2ImageInit( name );
      sio2ImageLoad( _SIO2image, _SIO2stream );

Is there a shorter and especially quicker way?

Thank you
Konstruktor

konstruktor

Posts : 6
Join date : 2009-03-13

Back to top Go down

Load SIO2image from CGImage/UIImage Empty Re: Load SIO2image from CGImage/UIImage

Post  sio2interactive Wed Mar 25, 2009 8:49 am

Search a bit on this forum I already post the code to do that...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum