How to Reduce jpeg size in mtPaint?(Solved Thanks)

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
number77
Posts: 378
Joined: Tue Jul 14, 2020 3:14 pm
Has thanked: 4 times
Been thanked: 12 times

How to Reduce jpeg size in mtPaint?(Solved Thanks)

Post by number77 »

Hello
I have Xenial64 on a Dell E6230.

Is there any way to reduce file size of a photo using Mpaint. I have upgraded to 3.49.12 but still cant work it out.
I dont use win10 but paint can do it.
Is there a way I have overlooked, or another program that will do this.
Help appreciated.
Thanks
number77

Last edited by number77 on Wed Mar 01, 2023 5:50 pm, edited 1 time in total.
User avatar
bigpup
Moderator
Posts: 6929
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 895 times
Been thanked: 1508 times

Re: How to Reduce jpeg size in Mpaint.

Post by bigpup »

If you are talking about MtPaint program.

Have it open and displaying the image.

From the menu toolbar at the top of MtPaint window.

Select image -> Scale Canvas

Only do one thing.

Change the new width number.
Bigger number to make image bigger.
Smaller number to make image smaller.

Click on OK button.

Do not need to change the new height number.
It will auto adjust based on what you changed the new width number to.

The other stuff you can select on the Scale Canvas.
I just keep them as they originally were.
No changes needed for them.

I use this to scale down images to post them to this forum.
.
.

Screenshot(3).jpg
Screenshot(3).jpg (77.15 KiB) Viewed 576 times

.

Screenshot big(3).jpg
Screenshot big(3).jpg (144.65 KiB) Viewed 576 times

.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
Flash
Moderator
Posts: 972
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 50 times
Been thanked: 124 times

Re: How to Reduce jpeg size in mtPaint?

Post by Flash »

What bigpup said. :thumbup:

Chaos coordinator :?
Burunduk
Posts: 249
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 124 times

Re: How to Reduce jpeg size in mtPaint?

Post by Burunduk »

After reading this thread I've typed image in the terminal and pressed <tab> - the command has been completed to image-changer. Didn't know this tiny program exists:

Code: Select all

root# image-changer --help
Examples:
Change format: image-changer old.jpg new.png
Scale by percent: image-changer old.jpg new.jpg 50
Scale by pixel size: image-changer old.jpg new.jpg 800x600
Rotate/flip: image-changer old.jpg new.jpg t[1..4]

It's on Fossapup, not Xenial.

Edit: I didn't know that too: the @bigpup's instructions can be translated to the mtPaint command line options. For example, to resize an image to 1000 px wide:

Code: Select all

mtpaint --cmd -file/open=philosopher.jpg -image/scale 'width=1000' -file/'save as'=electrician.jpg

or for short:

Code: Select all

mtpaint --cmd -f/o=philosopher.jpg -i/sc 'w=1000' -f/as=electrician

Notes:
Files are overwritten without confirmation.
Commands should be shortened carefully.
The mtPaint scripting manual is here.

mtPaint is totally scriptable. Everything you can do (except tweaking the GUI) you can also do from a script.

User avatar
MochiMoppel
Posts: 1222
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 20 times
Been thanked: 435 times

Re: How to Reduce jpeg size in mtPaint?

Post by MochiMoppel »

The OP asked to reduce file size, not image size - two different things.
A scaled down image may result in smaller file size , but there is no guarantee that it does

I can think of only one reliable way to reduce file size without compromising quality or changing image dimensions, and this is stripping EXIF metadata from the file - if there are any. I'm not sure if mtPaint can do this, however can be done with exiv2, probably included in all Puppies.

The easiest way to reduce file size is to resave the file with a lower quality setting (in mtPaint use "Save as.." , set "JPEG Save quality").
Allegedly there are tools that can convert a JPG file to a predetermined file size, but even those tools can not produce an exact size, due to the nature of the JPEG format. If it has to be an exact size and if the current size exceeds the desired size by only a few bytes, brute force can help: The truncate command can shrink a file to the specified size. Removing bytes from the end of a JPEG file will result in removed pixel blocks, starting from the bottom right corner.

User avatar
bugnaw333
Posts: 330
Joined: Wed Jul 20, 2022 11:04 pm
Location: Cebu, Philippines
Has thanked: 516 times
Been thanked: 65 times

Re: How to Reduce jpeg size in mtPaint?

Post by bugnaw333 »

I'm using--https://tinywow.com/
for video resizing but not tried yet on jpeg. ;)

User avatar
mikewalsh
Moderator
Posts: 6115
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 779 times
Been thanked: 1952 times

Re: How to Reduce jpeg size in mtPaint?

Post by mikewalsh »

bugnaw333 wrote: Wed Mar 01, 2023 12:33 pm

I'm using--https://tinywow.com/
for video resizing but not tried yet on jpeg. ;)

@Burunduk :-

Thanks for the link. Yet another option for on-line processing. Cheers!

I use this one for a lot of GIF stuff:- https://www.ezgif.com

Strictly speaking, yes, we should try to approach all problems from within Puppy itself, using native or easily-available tools. I mean, we're a bunch of computer geeks,yes? We ought to be able to figure anything out between us! However; I myself have turned to the Internet in recent years for much of my image-processing needs, because there is a wealth of on-line resources available. All the user requires is the available bandwidth to upload the original file, and to download the processed one.

The "grunt" work is all handled by the website's host servers. Yes, I know there's ffmpeg, which can handle just about anything you can throw at it, but I've never had the patience to familiarise myself with the million-and-one options it offers. The online tools are there, so.....I'll use them. I find them especially useful for most GIF-related adjustments, and conversion to/from some of the less-common still image formats.

Mike. ;)

number77
Posts: 378
Joined: Tue Jul 14, 2020 3:14 pm
Has thanked: 4 times
Been thanked: 12 times

Re: How to Reduce jpeg size in Mpaint.

Post by number77 »

bigpup wrote: Mon Feb 27, 2023 7:47 pm

If you are talking about MtPaint program.

Have it open and displaying the image.

From the menu toolbar at the top of MtPaint window.

Select image -> Scale Canvas

Only do one thing.

Change the new width number.
Bigger number to make image bigger.
Smaller number to make image smaller.

Click on OK button.

Do not need to change the new height number.
It will auto adjust based on what you changed the new width number to.

The other stuff you can select on the Scale Canvas.
I just keep them as they originally were.
No changes needed for them.

I use this to scale down images to post them to this forum.
.
.

.

Thanks bigpup
That worked perfectly

Burunduk
Posts: 249
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 124 times

Re: How to Reduce jpeg size in mtPaint?

Post by Burunduk »

mikewalsh wrote: Wed Mar 01, 2023 1:35 pm

@Burunduk :-

Thanks for the link. Yet another option for on-line processing. Cheers!

Thanks to @bugnaw333 who've posted the link.

I wouldn't use nor recommend online services. In my opinion, uploading files is like publishing them. But if the intention is to publish them after processing anyway, then it's probably OK.

By the way, it turned out [↑] that the image-changer program I've mentioned above is a part of PeasyScale by @rcrsn51 and scaling a jpg image in Puppy is even easier:

right-click an image icon in the rox filer -> menu "File '...'" -> PeasyScale -> set size and click the button "Scale"

User avatar
MochiMoppel
Posts: 1222
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 20 times
Been thanked: 435 times

Re: How to Reduce jpeg size in mtPaint?

Post by MochiMoppel »

bugnaw333 wrote: Wed Mar 01, 2023 12:33 pm

I'm using--https://tinywow.com/
for video resizing but not tried yet on jpeg. ;)

Don't bother. Their "Image Compressor" sends my CPU load to 100%, annoys with repeated captchas and eventually lets me choose a desired quality percentage, not telling me what effect it would have on size. Everything painfully slow.
mtPaint can do exactly the same, almost instantly.

User avatar
pp4mnklinux
Posts: 1098
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 628 times
Been thanked: 280 times
Contact:

Re: How to Reduce jpeg size in mtPaint?

Post by pp4mnklinux »

I agee with your comments:

When I capture an image using the default screen capture for puppy "mtpaint -s" , I always go to "save as" and the best way to save, is not searching for the extension you want to save the file as, you only need to add the desired extensión to the name of the file to use one or another ( XXXPP.jpg, XXXPP.png XXXPP.webp...) and in each situación the program ask then for the characteristics of the file u gonna save.

That's for me the best method and it is the one I use and recomend.

Of course, you can do it as MochiMoppel said, with the file you prefer.- Open it with mtpaint and you must choose, SAVE AS, and then play with options.... save quality, save some information or not, author..... and it works perfectly.

MochiMoppel wrote: Wed Mar 01, 2023 12:25 pm

The OP asked to reduce file size, not image size - two different things.
A scaled down image may result in smaller file size , but there is no guarantee that it does

I can think of only one reliable way to reduce file size without compromising quality or changing image dimensions, and this is stripping EXIF metadata from the file - if there are any. I'm not sure if mtPaint can do this, however can be done with exiv2, probably included in all Puppies.

The easiest way to reduce file size is to resave the file with a lower quality setting (in mtPaint use "Save as.." , set "JPEG Save quality").
Allegedly there are tools that can convert a JPG file to a predetermined file size, but even those tools can not produce an exact size, due to the nature of the JPEG format. If it has to be an exact size and if the current size exceeds the desired size by only a few bytes, brute force can help: The truncate command can shrink a file to the specified size. Removing bytes from the end of a JPEG file will result in removed pixel blocks, starting from the bottom right corner.

:arrow:

XFCE_FUSILLI . ===> https://puppyxfcefusilli.wordpress.com/

YouTube How_To . ==> https://bit.ly/f96ce_xfce_fusilli_HOWTO

Learning EASY OS . => https://easyos.org/

megan183
Posts: 5
Joined: Thu Jun 24, 2021 9:43 am
Been thanked: 4 times

Re: How to Reduce jpeg size in mtPaint?(Solved Thanks)

Post by megan183 »

Open your image in mtPaint. Go to save as option and choose the JPEG format. After that adjust the JPEG save quality option to reduce the file size. Lower quality settings result in smaller file sizes. On the other hand, you can use online application such as Jpeg Compressor for reduce your images without losing their quality.

Post Reply

Return to “Beginners Help”