English Amiga Board


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

 
 
Thread Tools
Old 03 November 2018, 20:48   #1
volvo_0ne
Registered User
 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
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 offline  
Old 12 November 2018, 01:59   #2
adrazar
Registered User
 
Join Date: Feb 2017
Location: Oslo
Posts: 90
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, 19:56   #3
volvo_0ne
Registered User
 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
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 offline  
 


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 12:10
Window size 2X aszu support.Amiga Forever 2 20 February 2015 23:31
Icon size mritter0 support.Other 1 23 May 2014 08:46
PNG Icon to Color Icon Converter? Leandro Jardim request.Apps 1 24 May 2010 04:39
HD size limitation? gizmomelb support.WinUAE 8 07 August 2006 16: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 18:06.

Top

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