10 June 2016, 21:22 | #1 |
Prototron
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
|
Does the transparent colour take up memory?
Just wondering,
When I import or grab an image into Amos I'm just wondering if the amount of transparent colour within (or around) the image makes any difference to memory requirements both storage or RAM when the bob is on screen? There's usually quite a bit under an outstretched arm or something within the box and just wondered if I should investigate other means like slicing them horizontally perhaps? Thanks! |
10 June 2016, 22:15 | #2 |
Registered User
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
|
It only would become significant if you are low on memory.
If not, I wouldn't worry about such trivia. |
10 June 2016, 22:22 | #3 |
Prototron
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
|
Excellent, thanks!
|
10 June 2016, 23:06 | #4 |
Ya' like it Retr0?
Join Date: Jul 2005
Location: United Kingdom
Age: 49
Posts: 9,768
|
@Brick Nash
The image will be stored as planes of data (think 2 dimension array as a plane) - the *transparent* plane will be a "mask" and consist as a pattern of bits in 0 and 1. Even if the byte is storing a '0' it will still be storing it so 8bits of '0' will still be a byte of memory. |
11 June 2016, 09:11 | #5 | |
Prototron
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
|
Quote:
I only ask as I was messing about with hotspots due to some image sizes being different heights and widths and that was causing some position syncing problems with the animations so I was importing them with really big chunks of transparent colour on either side in order to centre the image properly with flips and it was causing some nasty slowdown even just with one bob on the screen. My code probably isn't very efficient either as I tend to get some slowdown anyway if there's more than one Bob on screen but ATM I'm just using pure Amos basic with maybe Amal for attack moves so I don't know what it'd be like with some sort of extension Like AMCAF or whatever which is supposed to be faster. Anyway I sorted it by just setting the hot spot to top left and then offsetting the flipped image so it doesn't jump when turned around and that works nicely but the transparency was just something I wanted to know about. Thanks for the info! |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I need quick transparent blitting | meynaf | Coders. General | 15 | 13 November 2020 16:08 |
Transparent background | tolkien | Coders. System | 6 | 13 June 2015 00:09 |
Transparent winuae | Fermix | support.WinUAE | 5 | 12 December 2007 16:28 |
Amiga transparent icons how to | Tolismlf | support.Apps | 9 | 27 November 2004 15:00 |
Transparent icon dragging | oldpx | support.Apps | 2 | 05 September 2002 06:17 |
|
|