VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Let's just say I have a bunch of images that I want to losslessly compress to pdfs. Which type of lossless image format provides the smallest size for pdfs, 24bit png, 48bit png, bmp, tif, tiff, JPEG2000, or pcx?

    Which pdf tool compresses them the smallest, Adobe Acrobat, ImageMagick, or GIMP?

    Oh, and by the way, even if you losslessly compress them, will you lose some quality when you export them?
    Last edited by Mr. Fanservice; 5th Feb 2024 at 18:28.
    Quote Quote  
  2. Originally Posted by Mr. Fanservice View Post
    Let's just say I have a bunch of images that I want to losslessly compress to pdfs. Which type of lossless image format provides the smallest size for pdfs, 24bit png, 48bit png, bmp, tif, tiff, JPEG2000, or pcx?

    The filesize will always be larger for 48bit(16bit per channel), it's not comparable to 24bit (8bit per channel) formats.

    For 8bit RGB the smallest lossless output image format compression for PDF is JPEG2000 .


    Which pdf tool compresses them the smallest, Adobe Acrobat, ImageMagick, or GIMP?
    GIMP's PDF's were massive and it didn't offer jpeg2000 compression . But I tested on an older version. You can try a newer version , maybe it's supported now, not sure

    For the PDF container probably IMG2PDF, to wrap images into PDF. There is less overhead and it's faster
    https://pypi.org/project/img2pdf/


    (This is using 00214.png)

    Smallest JPEG2000 compressor out of those looks like ImageMagick .

    Adobe jpeg2000 lossless
    1,677,374 bytes

    ImageMagick jpeg2000 lossless
    1,633,321 bytes

    FFmpeg jpeg2000 lossless
    2,033,756 bytes



    Smallest PDF wrapper looks like IMG2PDF

    Adobe jpeg2000 lossless + Adobe PDF wrapper
    1,709,341 bytes

    Adobe jpeg2000 lossless + IMG2PDF wrapper
    1,678,831 bytes

    ImageMagick jpeg2000 lossless + IMG2PDF wrapper
    1,634,776 bytes


    Oh, and by the way, even if you losslessly compress them, will you lose some quality when you export them?

    Not if it's done correctly.

    You should be able to save it as PNG for example in acrobat

    But pdfimages can extract the image as-is with the original compression/format that was used in making the PDF
    https://www.xpdfreader.com/pdfimages-man.html
    Quote Quote  
  3. Originally Posted by poisondeathray View Post
    Originally Posted by Mr. Fanservice View Post
    Let's just say I have a bunch of images that I want to losslessly compress to pdfs. Which type of lossless image format provides the smallest size for pdfs, 24bit png, 48bit png, bmp, tif, tiff, JPEG2000, or pcx?

    The filesize will always be larger for 48bit(16bit per channel), it's not comparable to 24bit (8bit per channel) formats.

    For 8bit RGB the smallest lossless output image format compression for PDF is JPEG2000 .


    Which pdf tool compresses them the smallest, Adobe Acrobat, ImageMagick, or GIMP?
    GIMP's PDF's were massive and it didn't offer jpeg2000 compression . But I tested on an older version. You can try a newer version , maybe it's supported now, not sure

    For the PDF container probably IMG2PDF, to wrap images into PDF. There is less overhead and it's faster
    https://pypi.org/project/img2pdf/


    (This is using 00214.png)

    Smallest JPEG2000 compressor out of those looks like ImageMagick .

    Adobe jpeg2000 lossless
    1,677,374 bytes

    ImageMagick jpeg2000 lossless
    1,633,321 bytes

    FFmpeg jpeg2000 lossless
    2,033,756 bytes



    Smallest PDF wrapper looks like IMG2PDF

    Adobe jpeg2000 lossless + Adobe PDF wrapper
    1,709,341 bytes

    Adobe jpeg2000 lossless + IMG2PDF wrapper
    1,678,831 bytes

    ImageMagick jpeg2000 lossless + IMG2PDF wrapper
    1,634,776 bytes


    Oh, and by the way, even if you losslessly compress them, will you lose some quality when you export them?

    Not if it's done correctly.

    You should be able to save it as PNG for example in acrobat

    But pdfimages can extract the image as-is with the original compression/format that was used in making the PDF
    https://www.xpdfreader.com/pdfimages-man.html
    What other tools can extract images as it from the pdf and/or as png or other lossless image files without losing any quality? So should I use ImageMagick, img2pdf, or both?
    Quote Quote  
  4. Originally Posted by Mr. Fanservice View Post

    What other tools can extract images as it from the pdf and/or as png or other lossless image files without losing any quality? So should I use ImageMagick, img2pdf, or both?

    ImageMagick doesn't work for me to extract jpeg2000 images from PDF, or to convert them. Maybe there are some other switches that I don't know about .

    Just like ImageMagick doesn't make lossless PDF with jpeg2000 either - it can only make the jpeg2000 images, not put it into PDF correctly. The PDF it makes are lossy, so you use it to make the jpeg2000 images and Img2PDF to make the PDF.

    Img2PDF can't because it makes PDF (hence the name)

    pdfimages will extract the original images - so jpeg2000 if that was what used in the PDF - and that's lossless it's just like "demuxing" the image(s) from a PDF

    Acrobat works ok , or basically any PDF software that can view and save images. Your favorite XnViewMP can as well. If you save it as PNG it will become larger , because the compression is worse than JPEG2000



    Why not leave it as a jpeg2000 image without the PDF ? Then you don't have to extract anything and the filesize is smaller. What is the reason for using PDF ? Larger filesizes, extra steps
    Quote Quote  
  5. Originally Posted by poisondeathray View Post
    Originally Posted by Mr. Fanservice View Post

    What other tools can extract images as it from the pdf and/or as png or other lossless image files without losing any quality? So should I use ImageMagick, img2pdf, or both?

    ImageMagick doesn't work for me to extract jpeg2000 images from PDF, or to convert them. Maybe there are some other switches that I don't know about .

    Just like ImageMagick doesn't make lossless PDF with jpeg2000 either - it can only make the jpeg2000 images, not put it into PDF correctly. The PDF it makes are lossy, so you use it to make the jpeg2000 images and Img2PDF to make the PDF.

    Img2PDF can't because it makes PDF (hence the name)

    pdfimages will extract the original images - so jpeg2000 if that was what used in the PDF - and that's lossless it's just like "demuxing" the image(s) from a PDF

    Acrobat works ok , or basically any PDF software that can view and save images. Your favorite XnViewMP can as well. If you save it as PNG it will become larger , because the compression is worse than JPEG2000



    Why not leave it as a jpeg2000 image without the PDF ? Then you don't have to extract anything and the filesize is smaller. What is the reason for using PDF ? Larger filesizes, extra steps
    So what free tools can make lossless pdfs? I used img2pdf and I only get the same file size as my input images. Or unless, there's a way I can compress the pdf files to have smaller sizes without losing any quality of the images?
    Quote Quote  
  6. Originally Posted by Mr. Fanservice View Post
    So what free tools can make lossless pdfs? I used img2pdf and I only get the same file size as my input images. Or unless, there's a way I can compress the pdf files to have smaller sizes without losing any quality of the images?
    There is slight overhead for PDF. It's not exactly the same filesize, or you did something wrong. Look at the byte size

    You compress with jpeg2000 using ImageMagick, then use img2pdf . That was the smallest PDF lossless filesize I found. Maybe there is some better combination

    I don't know of any other way to have smaller filesizes, except to not use PDF . Maybe one of the exotic compressors like EMMA can compress it farther, you can try it - it can compress than images

    PDF will always be larger than any of the same input images, because of the overhead. It's a container, and that adds bytes. If you used non-jpeg2000 input and PDF to compress to JPEG2000, then the extracted JPEG2000 from that PDF will still be smaller . It's impossible not to be smaller in filesize than the PDF



    Why do you need to use PDF ?
    Quote Quote  
  7. Originally Posted by poisondeathray View Post
    Originally Posted by Mr. Fanservice View Post
    So what free tools can make lossless pdfs? I used img2pdf and I only get the same file size as my input images. Or unless, there's a way I can compress the pdf files to have smaller sizes without losing any quality of the images?
    There is slight overhead for PDF. It's not exactly the same filesize, or you did something wrong. Look at the byte size

    You compress with jpeg2000 using ImageMagick, then use img2pdf . That was the smallest PDF lossless filesize I found. Maybe there is some better combination

    I don't know of any other way to have smaller filesizes, except to not use PDF . Maybe one of the exotic compressors like EMMA can compress it farther, you can try it - it can compress than images

    PDF will always be larger than any of the same input images, because of the overhead. It's a container, and that adds bytes. If you used non-jpeg2000 input and PDF to compress to JPEG2000, then the extracted JPEG2000 from that PDF will still be smaller . It's impossible not to be smaller in filesize than the PDF



    Why do you need to use PDF ?
    So I'm supposed to convert my images to JPEG2000 first using ImageMagick?
    Quote Quote  
  8. Originally Posted by Mr. Fanservice View Post


    So I'm supposed to convert my images to JPEG2000 first using ImageMagick?
    Why do you need to use PDF ?
    Quote Quote  
  9. Originally Posted by poisondeathray View Post
    Originally Posted by Mr. Fanservice View Post


    So I'm supposed to convert my images to JPEG2000 first using ImageMagick?
    Why do you need to use PDF ?
    How else am I suppose to store dozens of lossless image formats while saving space?
    Quote Quote  
  10. Originally Posted by Mr. Fanservice View Post
    Originally Posted by poisondeathray View Post
    Originally Posted by Mr. Fanservice View Post


    So I'm supposed to convert my images to JPEG2000 first using ImageMagick?
    Why do you need to use PDF ?
    How else am I suppose to store dozens of lossless image formats while saving space?
    Did you want to store the formats as their native formats ? or only care that it was lossless and save space?

    PDF just increases the filesize of the same JPEG2000 images . PDF is only going to be larger. I posted the data above.


    Why do you need an "image" format ? Use video - You get temporal compression

    If you need an image format, use jpeg-xl . It's better than JPEG2000 . PDF means you're limited to JPEG2000. And PDF means larger filesize than the JPEG2000 images alone
    Quote Quote  
  11. Originally Posted by poisondeathray View Post
    Originally Posted by Mr. Fanservice View Post
    Originally Posted by poisondeathray View Post
    Originally Posted by Mr. Fanservice View Post


    So I'm supposed to convert my images to JPEG2000 first using ImageMagick?
    Why do you need to use PDF ?
    How else am I suppose to store dozens of lossless image formats while saving space?
    Did you want to store the formats as their native formats ? or only care that it was lossless and save space?

    PDF just increases the filesize of the same JPEG2000 images . PDF is only going to be larger. I posted the data above.


    Why do you need an "image" format ? Use video - You get temporal compression

    If you need an image format, use jpeg-xl . It's better than JPEG2000 . PDF means you're limited to JPEG2000. And PDF means larger filesize than the JPEG2000 images alone
    All right, say I have a video that is 1.93GB. How do I extract all frames so that the total file size will equal that amount?
    Quote Quote  
  12. Originally Posted by Mr. Fanservice View Post

    All right, say I have a video that is 1.93GB. How do I extract all frames so that the total file size will equal that amount?
    If it's some YUV video already using lossy temporal compression , it's simply not possible -

    Expect a lossless image sequence in any format to be much much larger. And most image sequences will be in integer RGB (such as 8bit , 16bit), so technically there is some quality loss

    But a re-encoded lossless video of that same YUV video would be smaller than the image sequence, but still much larger than the original YUV video
    Last edited by poisondeathray; 5th Feb 2024 at 22:25.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!