Scribus Forums

Scribus => Scripts and Plugins => Topic started by: BS69 on August 27, 2026, 04:29:40 PM

Title: Get the PPP informations
Post by: BS69 on August 27, 2026, 04:29:40 PM
Hi Guys,

Correct me if I'm wrong, there's no procedure to get the PPP informations of an imported image, like it is showed inside the image property tab or in the image manager.

Some images show 300x300 after import, some show 72x72 despite the exif resolution is 314x314 (Olympus tg7 images), well without this info I can't have the real scale factor inside a script as it is a combination of scale and resolution.


Title: Re: Get the PPP informations
Post by: BS69 on August 27, 2026, 05:10:01 PM
explained differently:

I import image one, I see A=100% and B=300x300
getImageScale respond 1.00 so the A value
in the SLA file ImageScale = "0.24"

I import image two from a different camera and I see A=100% and B=72x72
getImageScale respond 1 (100%) so the A value
in the SLA file ImageScale = "1"

So, in the SLA I got a combination % and resolution so I can count the pixels
with getImageScale I only get the A value not the B value, without a clue on value B I can't count the pixels

I assumed the B value being the DPI info from the exif, but it's not, as image 2 was DPI=314 in Exif

So, either the getImageScale should answer the same as SLA (a factor of 72 DPI) or it should answer value A as it does now but a getImagePPP procedure shoud answer the B value

Isn't it ? ;)
Title: Re: Get the PPP informations
Post by: a.l.e on August 27, 2026, 05:57:58 PM
In the UI, you can see the actual PPI in the "context menu > Info" and in "Extras > Manage Image".

In the Scripter, there is getImagePpi() (... it's really time for an update of the docs on impagina.org...)