Windows XP MSpaint and jpg

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Windows XP MSpaint and jpg

Post by myspacee »

Hello,
I want to understand and replicate same effect done by Windows XP mspaint.exe.

Post this 'large' image (2,3Mb) :
http://static.repubblica.it/laprovincia ... iginal.jpg

then same image opened and saved with MS paint (385 kb) :
http://static.repubblica.it/laprovincia ... SPAINT.jpg

how i can reproduce same 'conversion' ?

thank you for any info,
m.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Windows XP MSpaint and jpg

Post by Bonzo »

What conversion is that? They look the same to me except one is smaller than the other.
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Re: Windows XP MSpaint and jpg

Post by myspacee »

I can't obtain same result with IM.

Images are similar, but size it's very different; can't replicate mspaint result.
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

Re: Windows XP MSpaint and jpg

Post by GreenKoopa »

It looks like your goal is to reduce the file size of an image (but we are left to guess).

Code: Select all

convert original.jpg -quality 70 out.jpg
-quality sets your compression level (vs. visual quality). Change 70 to whatever trade-off you desire.

Also consider -strip or -resize to further reduce file size.
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Re: Windows XP MSpaint and jpg

Post by myspacee »

Hello,
maybe before i need to explain my goal.

I've an intranet portal where my user upload images to obtain jpg used in varius production task.

Now i need to 'normalize' varius image format before processing, so i use IM to strip, php to resize, and other tools,
before proced to user request.

I travel a lot for work and notice that in many places (everywhere) low skilled people used MSpaint (xp version)
to reduce image size. (mspaint strip also other information). Not only my madness, search on google find more
than one admin advise this 'trick'.

I know that jpg is a lossy format and all other details about size, numbers of color, quality, etc, but people out there think
mspaint is magick, when we know which tool is really (Image)magick.

So, so many words, to show that mspaint is used as standard (!) in production, and need some serius counterpart.

Anyone want to 'MSpaintize' ?

thank you,
m.
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

Re: Windows XP MSpaint and jpg

Post by GreenKoopa »

There is no magic, you are simply reducing file size by throwing away image quality.

Code: Select all

convert original.jpg -strip -quality 30 out.jpg
This reduces your image file from 2.30 MB to 0.18 MB by reducing the image's quality. Keep lowering -quality ## and you will definitely see the file size and visual quality shrink.

If you are also resizing or doing other operations, consider the order in which you do them. When possible, compression such as this is often done as the final step.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Windows XP MSpaint and jpg

Post by snibgo »

If you know (roughly) how small you want the output to be, you can use:

Code: Select all

convert original.jpg -define jpeg:extent=300kb out.jpg
snibgo's IM pages: im.snibgo.com
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Re: Windows XP MSpaint and jpg

Post by myspacee »

Thank you for reply,
I know that it's not magic, but maybe can't focus my goal.

I want to give noob user a smart upload that normalize file.
MSpaint can reduce size (and quality obviously) but, at common user eyes maintain image the same.

Googling find that MSpaint blurry a lot, but in posted examples, I can't see big differencies between 2 image on video.

If you can, reassume in a command line, syntax that can obtain same result, starting from posted image.

thank you again for your time,
m.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Windows XP MSpaint and jpg

Post by snibgo »

What rules does MSpaint follow? Does it reduce to a certain quality level, or does it reduce the size to a certain fraction?
snibgo's IM pages: im.snibgo.com
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Re: Windows XP MSpaint and jpg

Post by myspacee »

Snibgo i don't know MSpaint rules.
For sure image result blurred a bit, but result is very similar to source image.

Which are best IM switches to identify usefull informations abour jpg?

I want to replicate this process.

Thank you for all help,
M.
Post Reply