Page 1 of 1

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

Posted: Mon Feb 27, 2023 7:00 pm
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


Re: How to Reduce jpeg size in Mpaint.

Posted: Mon Feb 27, 2023 7:47 pm
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 551 times

.

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

.


Re: How to Reduce jpeg size in mtPaint?

Posted: Mon Feb 27, 2023 7:52 pm
by Flash

What bigpup said. :thumbup:


Re: How to Reduce jpeg size in mtPaint?

Posted: Mon Feb 27, 2023 10:52 pm
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.


Re: How to Reduce jpeg size in mtPaint?

Posted: Wed Mar 01, 2023 12:25 pm
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.


Re: How to Reduce jpeg size in mtPaint?

Posted: Wed Mar 01, 2023 12:33 pm
by bugnaw333

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


Re: How to Reduce jpeg size in mtPaint?

Posted: Wed Mar 01, 2023 1:35 pm
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. ;)


Re: How to Reduce jpeg size in Mpaint.

Posted: Wed Mar 01, 2023 5:49 pm
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


Re: How to Reduce jpeg size in mtPaint?

Posted: Thu Mar 02, 2023 1:00 am
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"


Re: How to Reduce jpeg size in mtPaint?

Posted: Thu Mar 02, 2023 1:14 am
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.


Re: How to Reduce jpeg size in mtPaint?

Posted: Thu Mar 02, 2023 4:43 am
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.


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

Posted: Mon Mar 04, 2024 12:11 pm
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.