image dimensions

Find quick help here to get you started with Hollywood
Post Reply
Bohun
Posts: 8
Joined: Sat Jul 16, 2016 8:34 am
Location: Poland

image dimensions

Post by Bohun »

I haven't found a way. How to read the width and height of the image?
plouf
Posts: 710
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: image dimensions

Post 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))
Christos
Bohun
Posts: 8
Joined: Sat Jul 16, 2016 8:34 am
Location: Poland

Re: image dimensions

Post 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.
plouf
Posts: 710
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: image dimensions

Post 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...
Christos
Bohun
Posts: 8
Joined: Sat Jul 16, 2016 8:34 am
Location: Poland

Re: image dimensions

Post 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.
plouf
Posts: 710
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: image dimensions

Post 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 ;)
Christos
Post Reply