English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. AMOS

 
 
Thread Tools
Old 03 November 2018, 21:48   #1
volvo_0ne
Registered User

 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 336
Get Icon size?

Hi
Does anyone know how to get the absolute size (width/height) of an Icon image from the icon bank?

I have several icons from 16x16px up to about 128x64px however I want to put them on screen with a zone around them so I would like to know the dimensions as it's pasted on screen.

TIA

V1
volvo_0ne is online now  
Old 12 November 2018, 02:59   #2
adrazar
Registered User

 
Join Date: Feb 2017
Location: Oslo
Posts: 40
I'm pretty sure the only way is to read it from the data structure manually. :/

The code looks something like this:
Code:
IMGADR=Leek(Start(2)+IMG*8+2)

WIDTH=16*Deek(IMGADR)
HEIGHT=Deek(IMGADR+2)
In this code example the first icon (number 1 in the bank) is found by choosing IMG=0.
adrazar is offline  
Old 13 November 2018, 20:56   #3
volvo_0ne
Registered User

 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 336
Quote:
Originally Posted by adrazar View Post
I'm pretty sure the only way is to read it from the data structure manually. :/

The code looks something like this:
Code:
IMGADR=Leek(Start(2)+IMG*8+2)

WIDTH=16*Deek(IMGADR)
HEIGHT=Deek(IMGADR+2)
In this code example the first icon (number 1 in the bank) is found by choosing IMG=0.
Excellent!
That does exactly what I want.

Many many thanks for your help.

V1
volvo_0ne is online now  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Screenshot size Feltzkrone HOL suggestions and feedback 10 16 June 2016 13:10
Window size 2X aszu support.Amiga Forever 2 21 February 2015 00:31
Icon size mritter0 support.Other 1 23 May 2014 09:46
PNG Icon to Color Icon Converter? Leandro Jardim request.Apps 1 24 May 2010 05:39
HD size limitation? gizmomelb support.WinUAE 8 07 August 2006 17:40

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 00:31.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.08616 seconds with 14 queries