PhotoCollage icon indicating copy to clipboard operation
PhotoCollage copied to clipboard

save poster with high definition

Open ferdiga opened this issue 8 years ago • 8 comments

Hi unfortunately the quality of the images decreases with every image added. at the end the printout - even on photo paper - has a poor quality.

I found 3 variables ./photocollage/render.py:28:QUALITY_SKEL = 0 ./photocollage/render.py:29:QUALITY_FAST = 1 ./photocollage/render.py:30:QUALITY_BEST = 2

but it seems QUALITY_BEST is never used sorry if my python knowledge is not sufficient to recognize if this is not the case.

ferdiga avatar Jan 01 '17 21:01 ferdiga

You have to use a higher resolution in the settings as well. res

We could argue, if by default a landscape layout with the highest possible resolution, given by the resolution of the input images, should be used. But i am not sure if that is so wise.

frankMilde avatar Jan 02 '17 07:01 frankMilde

Hi @ferdiga,

That's true: the final image is computed using the nearest neighbor algorithm, which results in slightly lower quality images. On the other hand, the best algorithm (antialias) is much more CPU-intensive and can freeze the application for a few seconds for large images.

In my opinion, the best solution would be to add an option in the settings dialog, for example:

Quality: fast
         best (slower)

Unfortunately I don't have time to develop this right know. Any help, any contribution is welcome!

@frankMilde: You are right, setting a bigger resolution helps, but still gives unpleasant artifacts. For instance, almost-horizontal lines in image get pixellated.

adrienverge avatar Jan 16 '17 18:01 adrienverge

I just hard coded the "BEST QUALITY" rendering. performance is OK for ~20 images on A4 landscape

index 70aa46c..2fbb6f5 100644
--- a/photocollage/render.py
+++ b/photocollage/render.py
@@ -124,7 +124,7 @@ class RenderingTask(Thread):
 
     """
     def __init__(self, page, border_width=0.01, border_color=(0, 0, 0),
-                 quality=QUALITY_FAST, output_file=None,
+                 quality=QUALITY_BEST, output_file=None,
                  on_update=None, on_complete=None, on_fail=None):
         super(RenderingTask, self).__init__()
 
@@ -218,6 +218,7 @@ class RenderingTask(Thread):
         else:
             method = PIL.Image.ANTIALIAS
 
+        method = PIL.Image.ANTIALIAS
         shape = img.size[0] * cell.h - img.size[1] * cell.w
         if shape > 0:  # image is too thick
             img = img.resize((int(round(cell.h * img.size[0] / img.size[1])),

ferdiga avatar Jan 16 '17 21:01 ferdiga

@ferdiga I'd like to use this feature as well, coud you please fork the project and commit your change? I'll then contribute for the settings dialog update (and configuration persistence once part of #38 about settings write to filesystem is done).

{edit} brought the changes on top of v1.4.4, now need some testing.

ojob avatar Nov 09 '17 09:11 ojob

I matured the code, and integrated it with config file; user can now define the setting, and it will be remembered between two sessions.

See the result in my daily build.

ojob avatar Nov 11 '17 08:11 ojob

Where is the config file to find please? I just git cloned your daily build repo and found no difference in the result. Why does this all take years? It's 2023 and PhotoCollage still outputs shitty quality. What about a saving dialog with quality settings for common file types? Rendering the preview in poor quality is OK, but why not giving the user the freedom of decision about output quality? Is it like GIMP to be no longer in standard desktop apps of UBUNTU because it is too complicated for targeted audience?

RealVegOs avatar Aug 08 '23 17:08 RealVegOs

Hi @RealVegOs, Options file is likely to be in ~/.config/photocollage/options.yml.

Concerning your rant: it takes years if nobody gives their time to implement functionalities. So, feel free to propose some code bringing improvement!

ojob avatar Aug 09 '23 07:08 ojob

There is absolutely no folder photocollage in my .configthat's why I 'rant'. If I could contribute code, I would. I have an account here, because I was testing some P2P software. I never contributet. I even have problems to learn git. I can do a git pull.

RealVegOs avatar Aug 09 '23 08:08 RealVegOs