Author Topic: iPhone Camera Roll  (Read 4574 times)

Offline Hark0

  • Prof. Inline
  • *****
  • Posts: 1020
  • Geek Developer
    • View Profile
    • LitioPixel - Desarrollo de videojuegos con GLBasic | Videogame development with GLBasic
iPhone Camera Roll
« on: 2010-Jun-29 »
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

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: iPhone Camera Roll
« Reply #1 on: 2010-Jun-29 »
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

Offline Hark0

  • Prof. Inline
  • *****
  • Posts: 1020
  • Geek Developer
    • View Profile
    • LitioPixel - Desarrollo de videojuegos con GLBasic | Videogame development with GLBasic
Re: iPhone Camera Roll
« Reply #2 on: 2010-Jul-08 »
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

Offline Hark0

  • Prof. Inline
  • *****
  • Posts: 1020
  • Geek Developer
    • View Profile
    • LitioPixel - Desarrollo de videojuegos con GLBasic | Videogame development with GLBasic
Re: iPhone Camera Roll
« Reply #3 on: 2010-Jul-14 »
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

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: iPhone Camera Roll
« Reply #4 on: 2010-Jul-16 »
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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10715
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: iPhone Camera Roll
« Reply #5 on: 2010-Jul-16 »
 :nw: :coke:

Offline Hark0

  • Prof. Inline
  • *****
  • Posts: 1020
  • Geek Developer
    • View Profile
    • LitioPixel - Desarrollo de videojuegos con GLBasic | Videogame development with GLBasic
Re: iPhone Camera Roll
« Reply #6 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

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: iPhone Camera Roll
« Reply #7 on: 2010-Jul-16 »
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

Offline Hark0

  • Prof. Inline
  • *****
  • Posts: 1020
  • Geek Developer
    • View Profile
    • LitioPixel - Desarrollo de videojuegos con GLBasic | Videogame development with GLBasic
Re: iPhone Camera Roll
« Reply #8 on: 2010-Jul-20 »
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

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: iPhone Camera Roll
« Reply #9 on: 2010-Jul-20 »
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

Offline djtoon

  • Dr. Type
  • ****
  • Posts: 290
    • View Profile
Re: iPhone Camera Roll
« Reply #10 on: 2010-Sep-21 »
sorry :)

so how do i import the .a file :)

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: iPhone Camera Roll
« Reply #11 on: 2010-Sep-21 »
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