Scribusoid

Author Topic: Scribus PhotoBook Tools  (Read 726 times)

rafferty

  • Newbie
  • *
  • Posts: 19
  • Karma: 1
  • Scribus User
Scribus PhotoBook Tools
« on: August 01, 2021, 11:04:16 am »
link: https://github.com/RaffertyR/PhotoBookTools-for-Scribus

‘PhotoBook Tools’ is a collection of scripts and tricks intended to create photo album pages in a fast and flexible way with Scribus. Please read the ‘Instructions’-file for installation and use!

Summary of workflow:
1) ‘PhotoBookLayoutMaker’-script generates image frame layouts (you can save them in the Scrapbook for future use).
2) Insert images in bulk into your image frames.
3) ‘PhotoBookFillFramesCentered’-script performs automatically a maximal fill of the selected image frames. If needed you can manually adjust.
4) ‘PhotoBookImageCropResize’-script will crop your images to the image frames and resize them to the desired dpi (reduction of file size).
5) Edit caption texts (if you have created them in step 1).
6) Export your photo book to pdf or other formats.

For Scribus 1.5.6 and higher (needs Python 3; tested in Windows 10 and Linux).

toyotadesigner

  • Full Member
  • ***
  • Posts: 115
  • Karma: 0
  • Active Scribus Mac User
    • architectural, industrial and business photographer
Re: Scribus PhotoBook Tools
« Reply #1 on: August 20, 2021, 09:34:30 am »
 Wow! Though I guess I will never use these scripts, I really appreciate your work to develop these scripts for the community.

Your #4: …and resize them to the desired dpi (reduction of file size).
This can be done while exporting the file to a PDF by setting the highest possible DPI value:

Nur wenige wissen, wie viel man wissen muss, um zu wissen, wie wenig man weiss.
Only few know how much you have to know to know how little you know.

— Werner Heisenberg [German theoretical physicist]

rafferty

  • Newbie
  • *
  • Posts: 19
  • Karma: 1
  • Scribus User
Re: Scribus PhotoBook Tools
« Reply #2 on: August 22, 2021, 06:20:34 pm »
@toyotadesigner: Thanks for your encouraging words.

About your remark: I found out by experimenting that even with maximum image compression, the PDF size is much higher than with using the ‘PhotoBookImageCropResize’-script.

Nermander

  • Hero Member
  • *****
  • Posts: 1456
  • Karma: 19
Re: Scribus PhotoBook Tools
« Reply #3 on: August 22, 2021, 08:37:05 pm »
The compression option for PDF export does, as far as I know, not crop the images.

I know we had disussions in the past about cropping images, because if the cropping does not follow 16 pixel multiples, the cropping will force a recompression of the file (losing quality), because JPEG compression compresses 16x16 pixel blocks. So I had a suggestion for script that looks at the desired crop but crops slightly larger (to avoid recompression). Then the image retains it's quality, and the visible part can be cropped by the image frame.
« Last Edit: August 22, 2021, 08:39:12 pm by Nermander »

toyotadesigner

  • Full Member
  • ***
  • Posts: 115
  • Karma: 0
  • Active Scribus Mac User
    • architectural, industrial and business photographer
Re: Scribus PhotoBook Tools
« Reply #4 on: August 22, 2021, 08:54:37 pm »
Does this behavior apply only to JPEG images, or to TIFF images as well?
Nur wenige wissen, wie viel man wissen muss, um zu wissen, wie wenig man weiss.
Only few know how much you have to know to know how little you know.

— Werner Heisenberg [German theoretical physicist]

Nermander

  • Hero Member
  • *****
  • Posts: 1456
  • Karma: 19
Re: Scribus PhotoBook Tools
« Reply #5 on: August 22, 2021, 09:07:28 pm »
Only JPEG. I have to confess I am not 100% sure it is 16x16 pixels...  Yes, it seems to be called MCU (Minimum Coded Unit). But there is also an 8x8 pixel restriction
https://en.wikipedia.org/wiki/JPEG#JPEG_compression

Quote
The top and left edge of a JPEG image must lie on an 8 × 8 pixel block boundary, but the bottom and right edge need not do so. This limits the possible lossless crop operations, and also prevents flips and rotations of an image whose bottom or right edge does not lie on a block boundary for all channels (because the edge would end up on top or left, where – as aforementioned – a block boundary is obligatory).


I don't think there is lossy compression possible with TIFF?


toyotadesigner

  • Full Member
  • ***
  • Posts: 115
  • Karma: 0
  • Active Scribus Mac User
    • architectural, industrial and business photographer
Re: Scribus PhotoBook Tools
« Reply #6 on: August 23, 2021, 09:28:45 am »
Thank you very much for clarification on this matter. I was asking because I've made hundreds of flyers, brochures, maxi postcards* and books with Scribus (for more than 10 years by now), but »only« with 16/48 bit TIFFs @300 dpi. Many of the images had been scaled and cropped in Scribus, and the results have been extremely sharp, clean and crisp. So, after reading about the compression problems, I wondered if there are the same limitations with TIFFs.

*Sample https://tinyurl.com/wsn8x8dd
Nur wenige wissen, wie viel man wissen muss, um zu wissen, wie wenig man weiss.
Only few know how much you have to know to know how little you know.

— Werner Heisenberg [German theoretical physicist]

rafferty

  • Newbie
  • *
  • Posts: 19
  • Karma: 1
  • Scribus User
Re: Scribus PhotoBook Tools
« Reply #7 on: August 23, 2021, 11:47:59 am »
I did some additional tests with tiff-files and found out that compressing the image first to 300 dpi with the Python Pillow package (used in my script) and then creating the pdf-file gives about 25% reduction in pdf file size versus compressing to 300 dpi with Scribus pdf creation only.

 

palmate