Load SIO2image from CGImage/UIImage

Go down

Load SIO2image from CGImage/UIImage

Post  konstruktor on 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:


      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


Posts : 6
Join date : 2009-03-13

View user profile

Back to top Go down

Re: Load SIO2image from CGImage/UIImage

Post  sio2interactive on Wed Mar 25, 2009 8:49 am

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

SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch

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

View user profile 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