PaperModelers.com

Go Back   PaperModelers.com > General Information and News > The Suggestion Box

Reply
 
Thread Tools Display Modes
  #1  
Old 01-31-2017, 06:00 PM
cafe's Avatar
cafe cafe is offline
Member
 
Join Date: Feb 2010
Location: some 58 km west of Paris
Posts: 3,969
Total Downloaded: 1.56 GB
PNG vs JPG

When posting an image as an attachment, the upload window says that JPG, GIF and JPG are limited to 5 MB or 640x480 pixels.

That's clearly not what happens in practice. PNG images with a width over 640 pixels are resized to 640 pixels and converted to jpg while JPG images are left as is.

examples :

here are 2 PNG images originally in 2268 x 935 resized to 640 pixels wide and converted to jpg by the forum's software.

here are 2 jpg images. The bigger one is 1429 x 2048. The forum's software didn't resize them.
Why are PNG and JPG images treated differently ?

Let's see what happens to this 1081x361 pixels PNG image. (58.67 kb). Edit: resized to 640x214 and converted to JPG. The smaller image (506 x 320) is left alone.

I'm using png images because that's the format Inkscape uses for exporting bitmaps.
Attached Thumbnails
PNG vs JPG-exocet-mirage5-50.jpg   PNG vs JPG-dev-cheetah_c-01.png  
__________________
Carlos
Reply With Quote
Google Adsense
  #2  
Old 02-08-2017, 10:01 PM
sjsquirrel's Avatar
sjsquirrel sjsquirrel is offline
Member
 
Join Date: Jun 2009
Location: Cranbrook, BC
Posts: 447
Total Downloaded: 38.14 MB
Perhaps this little extension for Inkscape would be of interest to you.

https://github.com/giacmir/Inkscape-...port-extension

It exports the image and then automatically converts the PNG to JPG. Haven't tried it myself, so if you do I'd be curious to hear if works for you.

Steve
__________________
My papercraft site: http://stevespaper.com
My website: http://stevebondy.ca
Currently developing: Normandy SR2 from Mass Effect 2
Reply With Quote
  #3  
Old 02-19-2017, 02:13 AM
cafe's Avatar
cafe cafe is offline
Member
 
Join Date: Feb 2010
Location: some 58 km west of Paris
Posts: 3,969
Total Downloaded: 1.56 GB
Thank you but I don't really want to install a new program on my old laptop (this solution apparently require an extension for Inkscape and another program). I'll keep converting the png to JPG with xnview.
__________________
Carlos
Reply With Quote
  #4  
Old 02-19-2017, 08:02 AM
cfuruti cfuruti is offline
Member
 
Join Date: Jun 2009
Posts: 487
Total Downloaded: 451.36 MB
Quote:
Originally Posted by sjsquirrel View Post
...

It exports the image and then automatically converts the PNG to JPG. Haven't tried it myself, so if you do I'd be curious to hear if works for you.

Steve
As I understand, the point is not convenience for the poster, but PNG files being degraded to JPG automatically and without notice. JPG is especially bad for line art (usually a noisy swarm of pixels surrounds hard edges); if the number of colors is limited, even GIF is better.
Reply With Quote
  #5  
Old 02-19-2017, 09:19 AM
db-sa db-sa is offline
Member
 
Join Date: Mar 2012
Posts: 166
Total Downloaded: 82.12 MB
Quote:
Originally Posted by cafe View Post
.... The smaller image (506 x 320) is left alone.
And there is your answer.
Reduce your oversize pictures before posting.
Windows "Paint" will do that even if Inkscape will not.
Reply With Quote
Google Adsense
  #6  
Old 02-19-2017, 09:47 AM
Kugelfang's Avatar
Kugelfang Kugelfang is offline
Member
 
Join Date: Feb 2009
Location: Silver Spring, MD, USA
Posts: 280
Total Downloaded: 37.97 MB
I'm sure it's all about the image file size. *.jpg files typically use less memory than *.png files of the same dimensional size. But the trade off is that they sacrifice visual fidelity. E.g., you'll get pixelization. The theory is that jpg will blend similar colors but the human eye will compensate for the blurriness and you will still perceive the image--pretty much as intended. Consequently, jpg format is considered a 'lossy' format because you actually lose image data in order to achieve smaller file size. And once you further compress a *.jpg file, you can achieve quite small file sizes and maintain a reasonable representation of the image.

Png format is considered 'lossless'. You don't really lose image data. Png is generally better at compressing the file, though, so you can still achieve fairly small file sizes but without losing image quality. But png's more efficient compression does not quite match jpg's compression+lossiness in terms of created small file sizes.

Generally, when you are providing a service which provides imaging hosting (such as papermodelers.com does) You want to prioritize serving smaller sized image files rather than more image fidelity in larger sized files. Thus, the preference for jpg files. This reduces memory needed to store the files, as well as transmission speed from the server to the browser when a user views the image.

I would take the ' limited to 5 MB or 640x480 pixels' as very approximate ranges. Depending upon the number of colors in the image, the compression algorithm used, the file format, image resolution and pixel dimension the formula can be exceedingly fluid.


--jeff
(My, ain't I verbose this morning!)


BTW, the reason Inkscape favors png is that jpg is a proprietary format (or at least was, the rights may have expired by now). Inkscape, being fairly serious about its open source roots, avoids incorporating proprietary technologies.
Reply With Quote
  #7  
Old 02-19-2017, 10:31 AM
cafe's Avatar
cafe cafe is offline
Member
 
Join Date: Feb 2010
Location: some 58 km west of Paris
Posts: 3,969
Total Downloaded: 1.56 GB
Quote:
Originally Posted by db-sa View Post
And there is your answer.
Reduce your oversize pictures before posting.
Windows "Paint" will do that even if Inkscape will not.
My issue is that the size restriction was relaxed for jpg, why not relax them too for png? Until a few months ago, you couldn't post a pdf as an attachment if it was over 200 kb, now the limit is 5 mb.

The original of the pic attached to this reply is a 2991 x 996 px PNG image of 521 kb. If I convert it to JPG with minimal quality loss it turns into a 644 kb file. If I choose the default 80% compression ratio, the resulting jpg is 237 kb but the image is now blurry. All 3 files are the same width/height.
Attached Thumbnails
PNG vs JPG-dev-mirageiiib-epner-50-ans.jpg   PNG vs JPG-dev-mirageiiib-epner-50-ans_1.jpg   PNG vs JPG-dev-mirageiiib-epner-50-ans-png.jpg  
__________________
Carlos

Last edited by cafe; 02-19-2017 at 11:00 AM.
Reply With Quote
  #8  
Old 02-19-2017, 10:38 AM
rickstef's Avatar
rickstef rickstef is offline
ETERNAL ADMINISTRATOR
 
Join Date: Jun 2007
Location: Lake Wales, Florida
Posts: 9,776
Total Downloaded: 683.37 MB
Send a message via Yahoo to rickstef Send a message via Skype™ to rickstef
We will take a look at the file size issue, and hopefully try to normalize the space allowed.

Rick
__________________
"Rock is Dead, Long Live Paper and Scissors"
International Paper Model Convention Blog
http://paperdakar.blogspot.com/
"The weak point of the modern car is the squidgy organic bit behind the wheel." Jeremy Clarkson, Top Gear's Race to Oslo
Reply With Quote
  #9  
Old 02-19-2017, 10:54 AM
cafe's Avatar
cafe cafe is offline
Member
 
Join Date: Feb 2010
Location: some 58 km west of Paris
Posts: 3,969
Total Downloaded: 1.56 GB
Thank you Rick!
__________________
Carlos
Reply With Quote
  #10  
Old 02-19-2017, 11:46 AM
db-sa db-sa is offline
Member
 
Join Date: Mar 2012
Posts: 166
Total Downloaded: 82.12 MB
As far as I can make out from what I've downloaded, both jpg & png are currently limited to 800 pixels width but can have greater height than that.
pdf may be a better bet if you want to post larger images.
Reply With Quote
Google Adsense
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 08:27 AM.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)
Copyright © 2007-2023, PaperModelers.com