Replies: 8 comments 55 replies
-
Hi Jeff, That is a pretty cool idea especially for people who often have differently formatted photos! I just showed this to my wife and she likes it! (A good sign generally as to what is permitted in the living room). Generally, I think it is very useful giving users various options especially because Pi3D is such a capable software that can do all kinds of crazy stuff. It would be nice if someday that found its way into PictureFrame2021! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the input @sapnho - much appreciated. And, glad your wife likes it. Actually, that was my first test here also... ;^) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
These look really good. I did think about doing something like the mat when I started with the version I made before Christmas. My thought was to have the 'cardboard' sheet 'on top' with bevel edges. Easy to flip it either way. The ambi light would have to attenuate to black (or white or whatever) quite quickly to avoid having too much frame and not enough picture - but yes it could just a variation of the blurred edge system. Having the mat as a pi3d object might be nice as it could then gradually change shape and color - presumably the ones in your pics Jeff are constructed in PIL |
Beta Was this translation helpful? Give feedback.
-
Still toying with generating an "automatically matted" image for the frame. Here's some samples (both singles and portrait pairs) from the variation I'm most pleased with ATM. Any thoughts? |
Beta Was this translation helpful? Give feedback.
-
Still working through some details here, as well as trying to figure out what options are actually useful to expose to the caller. Currently, it's possible to specify:
I'm mostly pleased with the auto-color selection, though not 100% of the time. Also, it's a bit slow. I experimented with various ways of getting a suitable color, but have been most pleased using a K-means clustering algorithm. While the results are better than other methods, it's slow because it takes an iterative approach and continues to refine the solution until its either 1) stable or 2) reaches some maximum number of iterations. I'm currently running it on an 80px thumbnail of the image in question, but even at that, it can take a number of seconds. Ultimately, I'd like to stuff the selected color into the cache for future use, but for now - it's recalculated each time (assuming a color isn't specified). Below are some samples of some of the variations - all using the same set of images for better comparison. First, one of each (current) mat style, using a textured background and the auto-selected color. Now, the same styles and auto-color selection, but with no mat texture. Finally, the same styles, with no texture, and a caller-specified base color (not necessarily a good color): One other likely miss right now... I'm building all of the mat "decorations" (bevels, shadows, etc) using pre-defined nine-patch images. While these are very efficient (just a few hundred bytes per image) and infinitely scalable linearly, they are "pre-baked". That is, the bevel width, shadow width, ... are predefined. I've designed them for display on an HD res monitor, but they'll likely need to be made larger for 4k displays. Unfortunately, that's not as simple as scaling the existing images on the fly, due to the nature of a ninepatch image. Likely, if any of this work holds water, we'll probably want to provide a few variations of these nine-patch files for other resolutions (which is pretty easy). I may also add some sort of "Polaroid" look as an additional style, but I don't have much more in mind. If anyone has something specific they'd like to see, let me know. Anyway, I guess that's all for now. I still hope to have some code to share over the weekend. |
Beta Was this translation helpful? Give feedback.
-
Jeff, I just added you mat style. Wow, this looks really, really good. I never put portraits on my frame, because this looks ugly for me. The "portrait_pairs" option was an improvement. An only portrait switch for mat would be perfect. |
Beta Was this translation helpful? Give feedback.
-
Related to this, I have something I'm happy with for mat selection now.
This feels much more natural to me than the previous 2 options and is way more flexible. I'll submit it sometime soon unless anyone has a concern. Related, I still want to handle the "auto color selections" in a cleaner manner too. I'll look at that soon. |
Beta Was this translation helpful? Give feedback.
-
While waiting for the dust to settle on the refactor of the picture frame code base and the merging of lots of great new features, I've been working on a new option for the presentation of images.
The obvious problem for a digital frame is in presenting images that don't fit the aspect ratio of the display. There are already a number of good ways to do that in the app, including:
While option 4 above may be the best option for some, I tend to like option 3 based on my current photo library (and the various formats it contains). That said, I've been seeking something a little more "elegant".
This also plays into how I eventually want to build my frame. I already have a 16:9 aspect monitor designated for my first frame. I had decided that I was going to use the monitor to show 3:2 formatted images using a physical mat (as a few other builders on Wolfgang's site have done) by having the mat cover the left/right edges of the monitor and adjusting the software borders accordingly.
However, I do have quite a number of mobile-device photos also, which fit rather nicely in a 16:9 space. So, I began to debate whether I really wanted to waste a portion of my 16:9 display. This is what drove me to the new image presentation method.
Basically, the new method presents the image on a colored mat, with a predefined minimum border around the edges. The image is just scaled to fit the mat with the defined minimum border. Each image is presented in a float mount style with a fine line around the image itself and a drop shadow on the right and bottom edges (ATM).
Also, I've reworked the portrait pairing feature I added earlier to treat the image pairs as individual images during processing and placement. That is, when images are paired, each gets their own fine border line and shadow, and the pair is then centered on the mat with a defined space between them.
The other touch is the mat color. I've done lots of experimentation here and have decided that selecting one of the "dominant" colors from the image looks best to my eye. Though, it's also possible to simply specify a single, static mat color for everything...
The code currently buckets all of the image pixels (using a thumbnail representation for performance) into one of 3 color buckets. These are the 3 colors that best represent the entire image. Then, I select the "least gray" color from those 3 colors (again, based on experimentation, this looks best to me). That becomes the color of the mat. Then, the thin outline around the image is either a darker or lighter version of the mat color, depending on whether the mat color is already considered "dark" or "light". Finally, the drop shadow generated for the image is made using a darker version of the selected mat color.
In the case of image pairs, the color selection process is currently done on the first image of the pair and the second image just comes along for the ride. While that might not be ideal in every case, it's been satisfactory to me so far...
Anyway, with this style, I'm happy to just let the mat fill the screen and the image(s) to take up whatever room they need. So, in my case, I think I'll stick with a 16:9 aspect frame with no physical mat, and let this method fill in any extra space for me.
I still have quite a bit of clean up to do before I'd be ready to submit a PR (and, I'm currently not working with paddy's most recent code), but I wonder if there's any interest in this presentation style as part of the standard app?
Here are a few random samples generated using the method described above:
Beta Was this translation helpful? Give feedback.
All reactions