Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [Tier 1][enhancement] using string field for image source

Author
Message
pprem
11
Years of Service
User Offline
Joined: 14th Jun 2012
Location: Paris, France
Posted: 8th Aug 2012 02:36
For a project, I would like to get pictures from Internet and post any to a website (for example after taken a photo).

I didn\'t see anything in AppGameKit commands to do that.

To my opinion, there is 2 ways to do it :
- making http commands like LoadHTTPImage and SendHTTPImage
- making it manually and giving us the ability to do what we want with pictures like taking photo, getting it in a string, saving it in AppGameKit folder, sending it with HTTP to a web server, ...

I think the second way is the best. So what do you think about this idea ?

Would you like to have those commands ?

id = LoadImageFromString(picture$)
LoadImageFromString(id,picture$)
=> create an image ID, like LoadImage, but from a string (when a string contain a valid picture file, of course)

picture$ = SaveImageToString(id,format)
=> create a string and fill it with the \"format\" (as jpeg or png) image source

--
Patrick P.
http://www.gamolf.fr
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 8th Aug 2012 10:06
I may have to do something similar, sending images from one networked device to another. My plan is to simply read the file using the existing commands and send the raw data to the second device. This will write it to a file.

You should be able to do this with no extra commands.

pprem
11
Years of Service
User Offline
Joined: 14th Jun 2012
Location: Paris, France
Posted: 8th Aug 2012 19:58
how do you access raw data from a loaded picture in tier 1 ?

--
Patrick P.
http://www.gamolf.fr
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 9th Aug 2012 01:20
wow, that is a-lot to expect from agk. I don't think that they will ever do this because they already have a big work load.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 9th Aug 2012 22:24
Quote: "how do you access raw data from a loaded picture in tier 1 ?"


You don't load it, you just open it as a data file for reading. If it's open as an image in your program, open it again for reading as data too.

pprem
11
Years of Service
User Offline
Joined: 14th Jun 2012
Location: Paris, France
Posted: 11th Aug 2012 17:46
Quote: "Quote: "how do you access raw data from a loaded picture in tier 1 ?"

You don't load it, you just open it as a data file for reading. If it's open as an image in your program, open it again for reading as data too."


If I get an image from Internet, of course I can write it in a file before using LoadImage, same thing if th epicture is in media folder.

There is a point where we can't use a file : with captured ou chossend image.

My App will use camera to capture files and send them to an Internet website. I need something to save images to file ou fgetting raw data from an image to do it.

I didn't see any AppGameKit command for doing this.

--
Patrick P.
http://www.gamolf.fr
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 12th Aug 2012 10:51 Edited at: 12th Aug 2012 10:52
Interesting as I am keen to do the same for various file types...

Is there a method to execute a file once downloaded so that it loads the external application list?

[Tier 1 of course]

EDIT

Really got to get used to the shift key...

Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 12th Aug 2012 10:58
SaveImage( iImageIndex, filename )
OpenToRead( ID, szFile )



JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 12th Aug 2012 11:22
Not really problem in Tier 2/Pascal on Windows, Android and Mac, but iOS seems to forbid forking external apps (as I understand it).

-- Jim
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 12th Aug 2012 11:25
Oh thats just great then...

Thanks guys...

So I must rely on other means...

pprem
11
Years of Service
User Offline
Joined: 14th Jun 2012
Location: Paris, France
Posted: 13th Aug 2012 20:26
omg, sorry, I didn't see "SaveImage" command on the documentation page !

I need hollidays, it's clear now

--
Patrick P.
http://www.gamolf.fr

Login to post a reply

Server time is: 2024-05-07 02:09:28
Your offset time is: 2024-05-07 02:09:28