Moderated by: chrisbet,
A conundrumJPG or PNG  Rate Topic 
AuthorPost

Posted by chrisbet: Wed Oct 9th, 2019 17:45 1st Post
I have been working on some gallery software for my own forum - to host my images instead of dropbox, so I can still share them with others.

Some images are taken with the camera rotated 90 degrees and of course the images appear 90 degrees out... I have some standard code that rotates the image and saves it back to the server but it would not work with the Nikon JPG files - the reason as it turns out is that they are NOT jpeg files but png files named JPG!

Anyone come across this before?



____________________
If it is broken it was probably me ....


Posted by jk: Wed Oct 9th, 2019 18:29 2nd Post
Many will ask.....What is the difference between a JPEG and PNG?

The main difference between JPG and PNG is the compression algorithms that they use. JPG uses a lossy compression algorithm that discards some of the image information in order to reduce the size of the file. ... With PNG, the quality of the image will not change, but the size of the file will usually be larger.


I havent noticed this myself.  I guess it depends on the software you use to process RAW to JPG.  In an earlier post you mentioned you used Darktable.  Could it be this that is the issue?



____________________
Still learning after all these years!
https://nikondslr.uk/gallery_view.php?user=2&folderid=none


Posted by novicius: Thu Oct 10th, 2019 16:24 3rd Post
Interesting, as i understand it, jpeg is used for computer/net use and Tiff for printing, so png is then better then jpeg ,but is it Clearly visibly better,or is it marginal ?...I suphose Capture NX-D will generate png ?



____________________
Back in Danmark

I do not use my equipment to make photo`s .. I take photo`s to use my equipment

The better I become at photography,the better my camera gets.


Posted by chrisbet: Thu Oct 10th, 2019 18:08 4th Post
JPEG is for photos and can produce small compressed files, PNG is for graphics and produces larger compressed files.

JPEG looks for similar pixels and makes "tiles" out of them so slight differences are lost.

PNG takes patterns of pixels and writes "shorthand" for them and a "code book" to decipher the shorthand.

JPEGs are fuzzy. PNGs are crisp.

But renaming a PNG file with a JPEG extension is just crazy - I think JK is on to something - I need to trace the route of the files through the system ...



____________________
If it is broken it was probably me ....


Posted by Robert: Thu Oct 10th, 2019 18:57 5th Post
This is the best explanation I can find, all the reference I can find have stated that PNG is typically used for illustrations using text and line drawings alongside photographic elements.

http://fixthephoto.com/tech-tips/difference-between-jpeg-and-png.html

However, I seem to remember that Adobe had a hand in PNG with Lightroom, which I think defaults to PNG output for the export of photographs. Need to check that one out.  There was some discussion about it being an Adobe proprietary format?  Locking users to certain processes. Can't remember the details.

For my part, for best image quality, I save exposed images as NEF (RAW) in the camera, then process and save as TIFF.  I export as JPEG at final size in about 80% quality depending on the intended use.  For utility photography and bulk like time-lapse where absolute quality is not required I save as JPEG in camera.

I steer clear of PNG as far as possible, my needs being served by TIFF and JPEG, I don't see any point in involving another file format when the others get the job done, I very rarely create composite images with text and photographs.



____________________
Robert.



Posted by Eric: Fri Oct 11th, 2019 12:50 6th Post
The print industry have accepted and used JPEGs, PNG, EPS and even PDF files for many years now. I don't remember the last time they asked for tiff files.

The main advantage of PNG over JPEG is their ability to be saved with transparent backgrounds.

This enables recipients to create overlays without any need for them to do further cutting out or the need for the supplier to send a Tiff or EPS file with a clipping path attached. 

Does this site accept PNG image files?



____________________
Eric


Posted by chrisbet: Fri Oct 11th, 2019 13:07 7th Post
Yes - the emojis are PNG files



____________________
If it is broken it was probably me ....


Posted by Eric: Fri Oct 11th, 2019 14:07 8th Post
And BIG. 😆



____________________
Eric


Posted by Eric: Fri Oct 11th, 2019 17:00 9th Post
Quick (crude editing) example to show a png with its transparent cutout, which enables the image to be overlayed over other images...in this case just the blue webpage background 'image'....



.......versus a jpeg where the cutout is automatically 'backfilled' with the default background colour...here white....which then itself becomes part of the overlay.








As JK said the png file is bigger than the jpg. In the case of this image about 10%. But colour content will influence the file compression and resulting sizes.



____________________
Eric

Reply
1st new
This is topic ID = 1745  
Nikon DSLR Forums > Photography > Photography > A conundrum Top

Users viewing this topic

Post quick reply

Current theme is Blue



A small amount of member data is captured and held in an attempt to reduce spammers and to manage users. This site also uses cookies to ensure ease of use. In order to comply with new DPR regulations you are required to agree/disagree with this process. If you do not agree then please email the Admins using info@nikondsl.uk Thank you.


Hosted by Octarine Services

UltraBB 1.173 Copyright © 2008-2024 Data 1 Systems
Page processed in 0.0462 seconds (61% database + 39% PHP). 76 queries executed.