PeasyScale Graphic Image Resizer

Paint programs, vector editors, 3d modelers, animation editors, etc.
Message
Author
User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#21 Post by greengeek »

rcrsn51 wrote: Since you still have the originals in the parent directory, nothing is permanently lost. And if you were batch converting a folder of images, you would not want to answer a "Yes-No" dialog for each one that was being overwritten.
Good point. I can imagine this utility would be very helpful for times when converting a whole directory of holiday snaps ready for printing, emailing, uploading to cloud storage or for displaying on one of those digital photo frame thingies...

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#22 Post by saintless »

Works also in Debian.
In case someone needs deb package: peasyscale_1.8_i386.deb.
Depends on libjpeg-progs (installed with synaptic or apt-get) and gtkdialog_0.8.3-1_i386.deb.
Maybe I'm wrong but I think there is small error in pinstall.sh script. It creates /root/root/.config/... instead /root/.config/...
Thank you!

Edit: Deb package updated to version 1.8
Last edited by saintless on Thu 29 Jan 2015, 13:57, edited 1 time in total.

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#23 Post by smokey01 »

Does it keep the exif data when resizing or dump it like mtpaint.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#24 Post by rcrsn51 »

smokey01 wrote:Does it keep the exif data when resizing or dump it like mtpaint.
I don't know. This sounds like a project for someone. :wink:

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#25 Post by rcrsn51 »

saintless wrote:Works also in Debian.
Excellent.
Maybe I'm wrong but I think there is small error in pinstall.sh script. It creates /root/root/.config/... instead /root/.config/...
It's OK. When a PET installs, it happens from /, not from /root.

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#26 Post by smokey01 »

It does strip out the exif data. :cry:

Using jpegtran like:

Code: Select all

jpegtran -copy all filename.ext > filename2.jpg
copies the file and leaves the exif data intact.

Maybe you can include the "-copy all" switch when scaling.

The attached file is the exif binary. Just drop it in /usr/bin and make it executable. To see the exif data in a photo:

Code: Select all

exif photo.jpg
I have exif converted to a rox app here somewhere. I can post it if you like.

Cheers
Attachments
exif.tar
Extract it in /usr/bin
(40 KiB) Downloaded 424 times

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#27 Post by rcrsn51 »

smokey01 wrote:Maybe you can include the "-copy all" switch when scaling.
Scaling is not done using jpegtran. It uses some gtk functions.

wjaguar
Posts: 359
Joined: Wed 21 Jun 2006, 14:16

#28 Post by wjaguar »

greengeek wrote:Just gave this a quick test - I'm keen on the % scale feature as this is one of the functions missing from mtPaint. Works well.
for ZAD in *.jpg ; do mtpaint --cmd -f/open="$ZAD" -i/scale w=30% -f/as=new."$ZAD" ; done

Support for PNG, and 20 more image formats, included. ;-)

Pelo

854x480 set as size

#29 Post by Pelo »

Nothing to say, perfect (for my needs).
Is there a way to stipulate a target size, e.g. 800x600 and to have everything scaled up or down in size to that? . Done.

I was asking for PNG to reduce all icons of a theme.
i just changed Jpeg and jpg by png in the script.
I gnewpet peasycale to peasyPNG for my own needs (rarely needed).

I would underline that many apps of the menu are 'Made in Europe'... merci les européens !

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#30 Post by edoc »

I apologize for dropping out of sight on this for a while ... lots of teen drama here plus birthday parties, Christmas returns & bills, etc ... sigh.

Anyhow, sorry to say it does not work in LightHouse64.

It creates the Peasyscale subfolder but throws no errors and converts no images.

Images are all .jpg

I tried both 50% and 800x600
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#31 Post by rcrsn51 »

edoc wrote:Anyhow, sorry to say it does not work in LightHouse64.
PeasyScale uses a 32-bit binary called peasyscale.bin.

I have sent you a 64-bit version of PeasyScale to test.

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#32 Post by edoc »

Sorry, again, got distracted ...

It appears to have worked, on steroids!

It chopped the 3.4g 2832x2128 image down to 53k 800x600!

I've been trying to test it on the Polaroid picture frame gadget but cannot get the computer to recognize it for some reason.

I need to buy a SC card and transfer the files there manually.

Thanks again and sorry for the delays!
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#33 Post by Moat »

rcrsn51 wrote:I have yet to get any feedback on the new WidthxHeight feature.
WidthxHeight works perfectly in Precise 5.7.1 retro!

Possible bug in the rotate function, though (?) - selecting Rotate 90 seems to have lopped off a bit of the original image's bottom, and added a corresponding blank area to it's top (see attached image result, for clarity - original "Fontwizard" screenshot window on left, post-rotated on right) -
Attachments
PeasyScale_1.7_rotate_test.jpg
Rotate 90 function results
(59.13 KiB) Downloaded 578 times

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#34 Post by Moat »

More artifacts, it seems... image attached, with individual pictures re-rotated back upright within Viewnior for easier comparison. "Rotate -90" trims a bit off the right and adds it back to the left - "Rotate 90" does so from bottom to top.

Bob
Attachments
PeasyScale_1.7_rotate_test2.jpg
PeasyScale rotate test2
(52.53 KiB) Downloaded 617 times

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#35 Post by Moat »

Just to add... Thinking it might have been an artifact from generating the above images via Precise's screenshot tool, I tried it on a random .jpeg downloaded from a webpage, with the same result as above.

Aack! Both "Flip vertical" and "Flip horizontal" are creating similar artifacts, too...

Bob

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#36 Post by rcrsn51 »

Thanks for testing the WidthxHeight feature.

I have also seen those artifacts left by transformations, but only with some jpegs. They are coming from the jpegtran tool, not from PeasyScale itself.

I looked at the jpegtran options and there is a "-trim" argument that solves the problem. I guess that it trims off any non-standard parts of the image.

You can test this yourself with

Code: Select all

jpegtran -rotate 90 -trim old.jpg > new.jpg
I have posted a new version above with this fix.
Last edited by rcrsn51 on Thu 29 Jan 2015, 12:05, edited 2 times in total.

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#37 Post by smokey01 »

rcrsn51, Have you looked at aaphoto?

If so how does it compare to jpegtran?

I know aaphoto retains the exif data and it seems to have similar functionality.
Attachments
aaphoto.tar.gz
aaphoto (32bit)
(33.66 KiB) Downloaded 513 times

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#38 Post by rcrsn51 »

smokey01 wrote:rcrsn51, Have you looked at aaphoto?
No, but I'm sure that it has more features.

The objective of PeasyScale is to provide some basic tools for Puppy users that do not require a larger third-party app like aaphoto.

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#39 Post by Moat »

rcrsn51 wrote: You can test this yourself with

Code: Select all

jpegtran -rotate 90 -trim old.jpg > new.jpg
Played with this, and yes - definitely seems the better choice to (only possibly!) lose a few rows of pixels, than to have them transposed onto some other edge of the image, instead. Apparently, an unavoidable byproduct of 100% lossless transformations on images sized with some uneven multiple of block sizes... or something like that... :)

Thank for the fix, rcrsn51!

Bob

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#40 Post by rcrsn51 »

Moat wrote:Apparently, an unavoidable byproduct of 100% lossless transformations on images sized with some uneven multiple of block sizes... or something like that... :)
My thoughts exactly. :wink:

If I transform an original JPEG from my camera, I don't see the artifacts.

I have posted the patched v1.8 above.

Post Reply