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 / [code snippet] Tier 1 shrink image at runtime using memblocks.

Author
Message
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 18th Jan 2013 10:41 Edited at: 18th Jan 2013 10:54
This whas an simple experiment to test agk memblock commands.

It grabbs an image and shrinks it size and use in memory at runtime.
Dont work well on to large images ?
the image in the sample is 160x160.

You nead beta 8 or higher.




Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz

Attachments

Login to view attachments
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 18th Jan 2013 10:42
the zipped project.

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz

Attachments

Login to view attachments
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Jan 2013 10:57
Interesting, did you add it to this yet?

I got confused by the original being placed on the right >.< good one

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 18th Jan 2013 13:22
I havent added it as i always try to share my samples anyway
I will see later if iam not to lazy to do the proper adjustments for it to fit in there

And wanted to share wath i learned to others who are intrested in memblocks as it can be used for image encryption also

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Jan 2013 13:27
Brilliant work!

MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 27th Jan 2013 05:30 Edited at: 27th Jan 2013 05:31
Cliff, for better result and prevent aliasing you can simply use an average filter (the final pixel (rgba values) by averaging the 4 or 8 pixels from original image which are around it + the concerned pixel (so averaging 5 or 9 pixels per final pixel).

A reminder: to find an offset in a Memblock and getting rgba values :

Login to post a reply

Server time is: 2024-11-24 05:41:22
Your offset time is: 2024-11-24 05:41:22