Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30

Thread: digital files

  1. #11

    Join Date
    Apr 2009
    Location
    Seattle area, WA
    Posts
    1,333

    Re: digital files

    It's also possible to encode PNG's in a lossy manor similar to JPGs, it's not always lossless https://pngquant.org/ Also this may actually be pre-processing to make the PNGs more compressible by strategically losing image detail, but an interesting technique nonetheless.

  2. #12

    Join Date
    Feb 2008
    Posts
    399

    Re: digital files

    JPEG might be an ok format for storing or transferring of a final version of the image. Not so much for editing as each time a change to the pixels is made and saved the content gets re-compressed using lossy algorithm or , with each edit and save it loses more and more of its original content and becomes repopulated with artificially generated one.

    P.S. It is even worse than that. Just opening + saving an image in JPEG (without making any edits) will trigger a re-coding and degradation of the original content. The more repetitions - the more alteration and degradation. Probably the first working implementation of AI in image processing. Andy Warhol could probably have taken advantage of that...
    Last edited by SergeyT; 12-Dec-2023 at 15:53.

  3. #13
    Alan Klein's Avatar
    Join Date
    Jun 2015
    Location
    New Jersey was NYC
    Posts
    2,588

    Re: digital files

    I asked this question earlier. Does anyone have an answer?

    I've noticed with jpeg, if you pick very high number (so the compressions is minimum), the final file will be larger in bytes than the original tiff.

    Is the process eliminating compression? Why is that happening?

  4. #14

    Join Date
    Jan 2006
    Location
    Tucson AZ
    Posts
    1,822

    Re: digital files

    There is a lossless version of JPEG defined in the standard, but I don't think it's been implemented by anyone. As commonly implemented in most cases the image is divided into 8 x 8 pixel blocks but 16 x 16 and even 32 x 32 blocks are possible.

    The big trick with JPEG (etc - it's true of other methods as well) is that some clever folks realized that if you looked at the intensities of a string of pixels you could sort of imagine a continuous curve (ie function in math speak) drawn through the values of each pixel - and it would be kind of wavy and have a fixed frequency and you could maybe apply a lot of what people already knew about waves and signal processing and the mathematical tools and techniques (cheats?) that were already sort of ready to hand and apply them to digital images. In particular ever since an 1822 paper by French gentleman by the name of Fourier we knew that it was possible to mathematically break a complicated wavy looking function (sorry - I meant complicated wavy line) into the sum of a bunch of regular wavy lines of varying frequencies. Now we were off to the mathematical races as we say - since we know that higher frequency signals (like shifts in color intensity and my wife's voice etc) are less perceptible to people and we can now express an image as a series of signals of different frequencies, by golly we could throw away a bunch of these high frequency i(e less perceptible fluctuations) waves and - voilà - we could scrunch these huge images down into smaller ones that still looked damned good. But we've still thrown away data in the quantization step and if we overdo it things will start looking like crap.

    (And along the way, somewhere around 1972 IIRC, another clever guy named Ahmed and his academic buddies came up with a way of applying all of this stuff to a string of discrete (ie not continuous) data points and developed the so-called Discrete Cosine Transform which is used in almost all of these compression schemes these days)

    Sorry for the rant - this kind of stuff is the bread and butter of many engineering disciplines so the above is not new news - in fact when I got into the CS/IT field in the late 50's, we had a stand alone IBM box that implemented the Fast Fourier Transform - it attached to the I/O channel of a a mainframe and looked from the computer sort of like a tape drive and you could write the input data to it and then read back the transformed data)

    I just thought a bit of stuff about what goes on under the hood of these algorithms might help demystify the process a bit for those of us that didn't waste our time in school on STEM stuff like I did (Chem+Physics.)

  5. #15

    Join Date
    Jan 2006
    Location
    Tucson AZ
    Posts
    1,822

    Re: digital files

    Quote Originally Posted by Alan Klein View Post
    I asked this question earlier. Does anyone have an answer?

    I've noticed with jpeg, if you pick very high number (so the compressions is minimum), the final file will be larger in bytes than the original tiff.

    Is the process eliminating compression? Why is that happening?
    There's no such thing as eliminating lossy compression - once information is thrown away, it's REALLY thrown away. It's just taking the recreated (and already somewhat crappier) originally sized version of the image and doing a less effective job of re-crappifyng it than previous iterations have done.

    There are tricks one could use to semi- improve things a bit before the re-crappification step but that would be up to Photoshop or whatever you used, not to the JPEG output process. I don't think there's any info carried along that would alert the JPEG process to the fact that this was a previously compressed image.

  6. #16
    darr's Avatar
    Join Date
    Apr 2005
    Location
    The South
    Posts
    2,300

    Re: digital files

    The larger file size with high-quality JPEG settings is due to the preservation of image data and reduced compression, which you've instructed the algorithm to do.

  7. #17

    Join Date
    Apr 2009
    Location
    Seattle area, WA
    Posts
    1,333

    Re: digital files

    Quote Originally Posted by darr View Post
    The larger file size with high-quality JPEG settings is due to the preservation of image data and reduced compression, which you've instructed the algorithm to do.
    And JPEG has no ability to "fall back" to a lossless compression scheme so it can end up being bigger than a compressed lossless TIFF..

  8. #18

    Join Date
    Jan 2006
    Location
    Tucson AZ
    Posts
    1,822

    Re: digital files

    I don't think many of us ever think about how thoroughly JPEG et al savage our images. First they might muck about with color spaces. then they run the DCT process on each "row" of the block. Then for good measure they run it on each column of the resultant array. Now they have a sort of 2D convolved bunch of 8 x 8 data so they can then make a diagonal scan and string the mashed data (it isn't the pixels we started with anymore folks after it's been through the digestive system twice) - so all the higher frequency sub blocks are all at the end of the newly strung out data. Then they chop off a bunch of the sub blocks just like docking the tail of a doggie. And that's what gets stored. Then when you read it they run the process backwards and rebuild an image that lacks a bunch of info that was in the original. Then when you save it again at lower compression setting they obligingly apply less compression the second time so you could have a larger file with potentially even less info in it.

    I always save a TIFF file plus a JPEG file if I want to send it somewhere. I only re-process the JPEG file if absolutely necessary.

    By the way, there really isn't any JPEG file format, there's JPEG compressed data in a JFIF file. We just call them JPEG files. Different standards.

  9. #19
    Alan Klein's Avatar
    Join Date
    Jun 2015
    Location
    New Jersey was NYC
    Posts
    2,588

    Re: digital files

    Thanks for the info. So, in Lightroom Perpetual 6.14, you can set output jpeg generation quality when you save an image from 0 to 100 with 100 being the highest. What's the best setting?

  10. #20
    Peter De Smidt's Avatar
    Join Date
    Jan 2001
    Location
    Fond du Lac, WI, USA
    Posts
    8,976

    Re: digital files

    There is no 'best'. There's always a quality versus file size dynamic. The highest quality is 100.
    “You often feel tired, not because you've done too much, but because you've done too little of what sparks a light in you.”
    ― Alexander Den Heijer, Nothing You Don't Already Know

Similar Threads

  1. Replies: 20
    Last Post: 5-Sep-2015, 06:55
  2. Wet prints from digital files
    By Toyon in forum Announcements
    Replies: 10
    Last Post: 15-Feb-2013, 10:46
  3. Replies: 10
    Last Post: 5-Jan-2013, 10:18
  4. Fiber Prints from Digital Files
    By Scott Watts in forum Darkroom: Film, Processing & Printing
    Replies: 6
    Last Post: 30-Aug-2004, 09:46
  5. saving digital files onto CDs
    By Saulius in forum Digital Hardware
    Replies: 7
    Last Post: 11-May-2004, 14:55

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •