Page 1 of 1

image dimensions

Posted: Mon Feb 23, 2026 7:01 pm
by Bohun
I haven't found a way. How to read the width and height of the image?

Re: image dimensions

Posted: Mon Feb 23, 2026 9:42 pm
by plouf
image you mean a loaded brush ?

use GetAttribute()

Code: Select all

LoadBrush(1,"c:\\23.png")

DebugPrint(GetAttribute(#BRUSH,1,#ATTRWIDTH))
DebugPrint(GetAttribute(#BRUSH,1,#ATTRHEIGHT))

Re: image dimensions

Posted: Mon Feb 23, 2026 10:31 pm
by Bohun
I'm thinking about a small program that manipulates photo dimensions and cropping. If using a brush is appropriate, then yes. I have no programming experience and I'm playing around with AI, but it's not quite right. After a long struggle, the AI ​​also managed to get attributes, but I wasn't sure. Thank you.

Re: image dimensions

Posted: Mon Feb 23, 2026 10:36 pm
by plouf
whats your logic?
how you plan to manipulate image ? you first have to load it correct?
but yes you cant find image size without loading it first

you can however examine image header, but is not that simple...

Re: image dimensions

Posted: Mon Feb 23, 2026 11:24 pm
by Bohun
The program's logic is as follows:
1. Load the image and read the dimensions
2. Display the image
3. Apply a movable rectangle for cropping
4. Select the rectangle format: 3R, 4R, 5R, A5, A4
5. Select the rectangle's horizontal/vertical position
6. Scale the image under the rectangle
7. Crop the image using the rectangle/crop
8. Save the cropped image in PDF format
9. Simple printout using an external VPDF program

I'm afraid it's beyond me, even with AI ;-) but it's fun.

Re: image dimensions

Posted: Mon Feb 23, 2026 11:30 pm
by plouf
well as for image size
you said
1. Load the image and read the dimensions
after this which is obvious a LoadBrush() you can get image size

as for the complicated level, is not that complicated since you are using a veryhigh level languange and a layer (hollywood)

most probably the problem is that you rely heavy in AI and dont experiment your self :)
a few hours reading manual will help you build this app, is possible :)

at any case Goodluck withj your project ;)