Picasa and Google Plus Express
phototile imperfections (7 posts)

  1. markusk
    Posted 3 years ago #

    kudos to gjanes for taking care of this great plugin!

    i especially like the phototile-option, but where do these small imperfections in the image-alignment come from? i see you've got those on your own homepage as well, so you probably know what i mean - the spacing and hence the alignment at the borders just seems to have slight errors which give odd results:

    any hints where i could try to get this corrected myself?



  2. gjanes
    Plugin Author

    Posted 3 years ago #

    The problem is the fact that the phototile display must round when scaling to the dimensions that you request.

    For example, the actual dimensions where the phototile will display without rounding would be 1000 pixels in width. Even divisors of that also work *fairly* well, but again when it has to scale to your width, then scale all photos to match, a photo must be requested in even pixel amounts, but the scaling usually ends up with decimals.

    The plugin does the best to figure out the best way to round either up or down to make things add up correctly, but unfortunately it never quite works perfectly.

    If someone wants to look at the code and offer suggestions for better ways to handle rounding and image dimensioning, I'd be happy to implement it. But the logic got really tricky and I got tired of fighting with it and got it to a "close enough" state and let it go.

  3. markusk
    Posted 3 years ago #

    what i suspected. probably cropping is the only way to get around this..

    so you did write this yourself? this isn't a thirdparty-lib? isn't there any?..

  4. gjanes
    Plugin Author

    Posted 3 years ago #

    I wrote the phototile layout myself. There wasn't any 3rd party library that seemed to accomplish what I wanted it to do in replicating what Google+ does.

    The photos are actually being cropped in the phototile layout, but the problem is determining the exact width (minus the borders) to make each photo, especially when in a series of 4 photos in a multi-row layout, 4 of the same width don't add up to the target width, so the photos need to differ in width, some rounding up and some rounding down.

    I'm sure that there would be a better way to handle the dimension setting, but I had spent enough time on the functionality that I didn't want to commit any further time - it was "good enough".

    I would gladly accept suggestions for improvement from anyone who wants to pour through the code, make changes, test them and then provide me with the modifications to make.

  5. markusk
    Posted 3 years ago #

    seen this?
    (hurray for badly SEOed pages..)

  6. markusk
    Posted 3 years ago #

    though.. no.. that has same height lines all the time.. and most others either.. nevermind.

  7. gjanes
    Plugin Author

    Posted 3 years ago #

    Yeah, I looked at several phototile layout projects, but nothing really seemed to imitate Google+ very well.

    I also looked at several of the box packing problem algorithms and libraries available, but again nothing really fit what I wanted to do in matching what Google+ does.

    So, I finally wrote my own. And the mechanism is simple enough, except for the scaling and rounding issue, which I tried several iterations of changes to perfect and never could quite get it perfect.

    I would love for someone with some extra time to review my code and provide suggested enhancements, but I've already probably allocated too many hours to it myself.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Picasa and Google Plus Express
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic