English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language

 
 
Thread Tools
Old 10 June 2016, 21:22   #1
Brick Nash
Prototron
 
Brick Nash's Avatar
 
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!
Brick Nash is offline  
Old 10 June 2016, 22:15   #2
volvo_0ne
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.
volvo_0ne is offline  
Old 10 June 2016, 22:22   #3
Brick Nash
Prototron
 
Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
Excellent, thanks!
Brick Nash is offline  
Old 10 June 2016, 23:06   #4
Zetr0
Ya' like it Retr0?
 
Zetr0's Avatar
 
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.
Zetr0 is offline  
Old 11 June 2016, 09:11   #5
Brick Nash
Prototron
 
Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
Quote:
Originally Posted by Zetr0 View Post
@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.
Cool that's good to know.

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!
Brick Nash is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:20.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12145 seconds with 15 queries