Bug 480403 - Overlap of caption and image, bad placement on page
Summary: Overlap of caption and image, bad placement on page
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-PrintCreator (show other bugs)
Version: unspecified
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-27 19:55 UTC by quazgar
Modified: 2024-01-27 21:46 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Overlapping text and images. (366.68 KB, image/png)
2024-01-27 19:55 UTC, quazgar
Details
uncentered images on page (132.08 KB, image/png)
2024-01-27 19:55 UTC, quazgar
Details
smaple image with 3:2 aspect ratio (15.79 KB, image/png)
2024-01-27 21:25 UTC, quazgar
Details
Resulting PDF with the overlapping text. (31.93 KB, application/pdf)
2024-01-27 21:32 UTC, quazgar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description quazgar 2024-01-27 19:55:01 UTC
Created attachment 165288 [details]
Overlapping text and images.

SUMMARY

The PrintCreator has the following issues:

1. It sometimes places the caption into the image, see the screenshot in `overlap.png`.
2. It sometimes places the images very close to one corner instead of centering everything in the middle.

STEPS TO REPRODUCE
1. Have some pictures ready.
2. Start the PrintCreator plugin.
3. Set the page to A4
4. Select Custom page layout of 4x4 (for overlapping caption) or 6.0x4.3cm (for off-center positioning)
5. Set caption to file name
6. Do not crop images (don't know if that matters)
7. Print to PDF.

OBSERVED RESULT

1. Text overlaps.
2. Images are very close to the border, possibly over the printing margin.

EXPECTED RESULT

The opposite.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian 12
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 quazgar 2024-01-27 19:55:29 UTC
Created attachment 165289 [details]
uncentered images on page
Comment 2 quazgar 2024-01-27 20:12:59 UTC
Additional notes:

1. I was able to reproduce this with the 8.2.0 AppImage. Are there nightly images of development versions?
2. I tried to add an additional newline before the text with the custom string `.\n%f` (the dot is there just as a marker).  To no avail, it seems like the whole text element is aligned to its bottom (the `.` is even further up the image).
Comment 3 quazgar 2024-01-27 20:23:33 UTC
Further experimentation shows:

1. Setting a custom photo size in the custom layout, that is far wider than required for the photos helps. For example 7.5x4.9 instead of 7.5x4.3 (corresponding to 3:2 image ratio) seems to leave enough space for the text. Maybe the text should not be rendered into the image box in the first place?
2. The margins which are set in the page settings are completely ignored, but maybe that should be a different bug report?
Comment 4 quazgar 2024-01-27 20:26:33 UTC
(In reply to quazgar from comment #3)
> required for the photos helps. For example 7.5x4.9 instead of 7.5x4.3

Typo: 6.5 instead of 7.5 here.
Comment 5 caulier.gilles 2024-01-27 20:59:09 UTC
which digiKam version did you use ?
Comment 6 Maik Qualmann 2024-01-27 21:10:19 UTC
Git commit 8b415c51c4e3c48f28989100b5957c2328004603 by Maik Qualmann.
Committed on 27/01/2024 at 21:09.
Pushed by mqualmann into branch 'master'.

fix center in custom layout when cm is used

M  +12   -10   core/dplugins/generic/tools/printcreator/wizard/advprintphotopage.cpp

https://invent.kde.org/graphics/digikam/-/commit/8b415c51c4e3c48f28989100b5957c2328004603
Comment 7 Maik Qualmann 2024-01-27 21:17:00 UTC
I cannot reproduce the problem with overlapping text. What image aspect ratio does your example use? What font and size have you set?

Maik
Comment 8 Maik Qualmann 2024-01-27 21:19:04 UTC
A note, because I'm just now reading your other comments, it is intended that the text appears in the image.

Maik
Comment 9 quazgar 2024-01-27 21:25:17 UTC
Created attachment 165291 [details]
smaple image with 3:2 aspect ratio
Comment 10 quazgar 2024-01-27 21:28:19 UTC
(In reply to Maik Qualmann from comment #7)
> I cannot reproduce the problem with overlapping text. What image aspect
> ratio does your example use? What font and size have you set?

I just added sample image with 3:2 ratio. Font is Noto Sans (but doesn't seem to matter), size seems to be the second smallest.
Comment 11 quazgar 2024-01-27 21:31:22 UTC
(In reply to caulier.gilles from comment #5)
> which digiKam version did you use ?

Originally ShowFoto 7.9.0, but I downloaded the 8.2.0 AppImage and reproduced everything there.
Comment 12 quazgar 2024-01-27 21:32:04 UTC
Created attachment 165292 [details]
Resulting PDF with the overlapping text.
Comment 13 quazgar 2024-01-27 21:46:37 UTC
(In reply to Maik Qualmann from comment #8)
> A note, because I'm just now reading your other comments, it is intended
> that the text appears in the image.

Ok, so if the design decision is to have text and image overlap, then I feel it should be possible to set a background color for the text as well, for example to have a rectangle of the bg color as background to the text itself.  If you feel this is easier, we could also have a conversation over IRC, I will try to be online in #digikam over the next few days.