iPhone Camera Roll

Previous topic - Next topic

Hark0

Hi!

Is there any way to access the camera roll?

I would like to export images, if possible ...  =D

TIA, Hark0
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

trucidare

i need an iimage to save to camera roll.
If you can get one and save it to a file in documents folder i can save it.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Hark0

Sample of snapshot. You can find your files at My Documents folder... and //DOCUMENTS into app on iPhone.

Code (glbasic) Select
//Render to backbuffer
FOR n=0 TO 320 STEP 5
DRAWLINE 0,0,n,480,RGB(255,255,255)
DRAWLINE 320,480,n,0,RGB(255,255,255)
NEXT


//Capture backbuffer to Sprite 0 with GRABSPRITE no%, x%, y%, width%, height%
GRABSPRITE 0,0,0,320,480


//Saving the Sprite 0
SAVESPRITE PLATFORMINFO$("DOCUMENTS")+"//Snapshot_GLBasic.png",0
SAVESPRITE PLATFORMINFO$("DOCUMENTS")+"//Snapshot_GLBasic.bmp",0


//Shows backbuffer
SHOWSCREEN
MOUSEWAIT


Images captured on iPhone.  =D

But.... no viewable on device.  :rant:

[attachment deleted by admin]
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

Hark0

This info are about sotring images on Photos Album on iPhone (and iPad).

There is the Official link from Apple: (UIImageWriteToSavedPhotosAlbum)

http://developer.apple.com/iphone/library/documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html#//apple_ref/c/func/UIImageWriteToSavedPhotosAlbum

Trucidare... how to "adapt / translate / use" with GLBasic???

TIA  ;)
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

trucidare

my function read pixels from current screen.

this looks like this: (loaded a sprite on top of hark0s line arrangement.



[attachment deleted by admin]
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Kitty Hello


Hark0

Quote from: trucidare on 2010-Jul-16
my function read pixels from current screen.

this looks like this: (loaded a sprite on top of hark0s line arrangement.

Sprite can are loaded from camera roll?  :happy:
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

trucidare

no because you need an imagepicker view on top of the glbasic view.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Hark0

What happens next?

:P
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

trucidare

Ooops Forgot to release the lib.

Here it is.

EDIT:// The Lib could be grow from time to time,, but only Photo and Camera code.

[attachment deleted by admin]
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

djtoon

sorry :)

so how do i import the .a file :)

trucidare

Compile your game with my IMPORT "C" functions use these functions in your code - compile your game - copy xcode project to mac open it with xcode and right click on frameworks -> add existing files -> search for the cameraroll .a and add. Compile and no errors should be come.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC