[HN Gopher] Generating more interesting image previews using ima...
       ___________________________________________________________________
        
       Generating more interesting image previews using imagemagick
        
       Author : rognjen
       Score  : 112 points
       Date   : 2021-05-05 08:04 UTC (2 days ago)
        
 (HTM) web link (ognjen.io)
 (TXT) w3m dump (ognjen.io)
        
       | asiachick wrote:
       | I used puppeteer (headless chrome) to generate image previews.
       | Can use the Canvas API and/or WebGL1 and WebGL2. Can also auto-
       | add titles etc... You could even overlay HTML styled with CSS (vs
       | drawing text with the Canvas API) and use the Puppeteer API to
       | take a screenshot instead of using the canvas API to capture the
       | canvas.
        
         | devmunchies wrote:
         | don't need all of headless chrome to use the canvas. can just
         | use node-canvas.
         | 
         | https://github.com/Automattic/node-canvas
        
       | simion314 wrote:
       | Why a blurred image do better then a low resolution or
       | watermarked img ? I only seen this blurred stuff with dating
       | sites where they send you some blurred img of someone that "is
       | interested" , in this case I see maybe some way where the blur is
       | trick to make you wonder what is under the blur, let me know if
       | there are other uses that I can't think of.
        
         | randcraw wrote:
         | I agree, a 4x or 16x downsampled version seems like the obvious
         | way to quickly denature an image without bias. The algorithm is
         | trivial to implement and will run insanely fast. And the
         | smaller amount of data has the added bonus of loading faster
         | too.
        
       | bredren wrote:
       | Having bought image assets in the past, I agree these these ideas
       | would not make it easier to decide whether to license something.
       | 
       | Sometimes I've taken design drafts very far along, including
       | manually removing the watermark, to see a full, if lower res,
       | composite before deciding to license imagery for a final work.
       | 
       | That said there is some useful examples of working with
       | imagemagic here and it does deliver on "more interesting image
       | previews."
        
       | blunte wrote:
       | (removed because I posted this on the wrong article comment
       | section!)
        
         | SamBam wrote:
         | I'm confused, because not only is the article not in "dark
         | mode" in any way (it has a bright white background) but it's
         | css doesn't even seem to include a dark-mode version, so I
         | don't know what you're seeing.
        
           | blunte wrote:
           | Crap. I clicked the wrong comment link. My bad! I'll remove
           | my post.
        
       | hans-moleman wrote:
       | Anyone that buys art assets online will tell you this is a bad
       | idea. You're obscuring the subject of the image and changing the
       | feel of the picture. Watermarks and low res previews make sense
       | because they will just make the image look worse while still
       | being 100% recognizable. In his examples I cannot tell anymore
       | that it's an image of two men fighting.. so why would I buy that
       | picture if I can't tell what I'm looking at?
        
         | Groxx wrote:
         | If tied with a "make a paid account to access the obscured
         | images", the non-obscured images may be useful enough on their
         | own to be worth the initial buy-in. And the obscuring makes for
         | a pretty strong block on use without at least _some_ payment,
         | as it 's far harder to remove than most watermarks.
         | 
         | I do agree that a watermark is (strongly) preferable for
         | choosing which individual images to buy - small details can
         | make or break images, and this obscures a _lot_ of the image.
         | Just pointing out that there may be uses on the same kinds of
         | sites.
        
         | ______- wrote:
         | > You're obscuring the subject of the image and changing the
         | feel of the picture
         | 
         | For those who have turned meme-creating into a sport,
         | watermarks and other attributable data are vital in seeing how
         | that meme spreads. I know people that deliberately put a yellow
         | 1px border beneath each image they share (and created) so that
         | if they spot it somewhere else, both they and others can guess
         | where it originated. There are other more sophisticated methods
         | which I can't mention here for detecting meme spread, but
         | watermarks are a big deal in the meme world.
        
           | nolok wrote:
           | > There are other more sophisticated methods which I can't
           | mention here
           | 
           | I found that very funny in a austin power kind of way, like
           | this is some sort of giant secret technology.
           | 
           | The most efficient methods of watermarking pictures in ways
           | that are easy to detect, easy to hide for the viewer yet hard
           | to remove for the copier are all well known and detailed on
           | the internet, in fact wikipedia is a decent source before
           | going into more technical content.
           | 
           | And in terms of "memes", this sort of watermark is most often
           | done by individual users for reasons related to ego rather
           | that copyright protection. Because the actual money making
           | memes oriented websites will prefer the good old heavy duty
           | watermark all over the picture, since it will be copied
           | anyway they figure they might as well ensure the final viewer
           | knows where it came from so he can look for it and get them
           | new traffic.
        
         | dylan604 wrote:
         | "more interesting" is definitely a term of opinion. I'd agree I
         | don't see these as useful for anything that I can imagine, but
         | if we limited things others can do to "what I can imagine" the
         | world would be a semi-dull place.
        
         | lupire wrote:
         | It's an interesting case of "here's my idea for a product I
         | didn't launch" ia likely inferior to an idea that passed
         | customer acceptance testing.
        
         | rdhatt wrote:
         | I work for a company that sells images online. I could see a
         | technique like this being used for NSFW images that come up in
         | our search results. It would allow you to have an idea of the
         | image before clicking into the image detail page to see the
         | normal watermarked image.
        
         | SamBam wrote:
         | I agree. I also just don't understand the logic behind
         | obscuring the most important part of the image, the one that
         | people will base their decision on.
         | 
         | A small, lower resolution image seems ideal. Anyone who's even
         | considering buying a full-res photo isn't going to see a
         | 200x300 image and say "what the heck, I'll just take that
         | instead." If they did, they weren't going to buy the original
         | either.
         | 
         | And if you want to give the users a sense of the final
         | resolution, you could take a corner of the image and show that
         | at full-resolution, while making it clear in the UI that it's
         | only a corner.
        
       | barbazoo wrote:
       | > After all, users would need to get a sense of what it looks
       | like before they'd want to buy it.
       | 
       | Interesting work but I doubt it's what anyone buying these assets
       | would want.
        
       | angryasian wrote:
       | Great article, this is the content I come here for. I think its a
       | really interesting thought experiment in how we might want to try
       | things differently. Also thanks for sharing your experience with
       | imagemagick and code.
        
       | bberenberg wrote:
       | I think this is a really interesting idea. Would love to see
       | these results and other experiments also compared in terms of
       | resulting file size.
        
         | dpflan wrote:
         | The impetus for this was to create a less blurred, more
         | coherent preview image that is not the original image. Why is
         | that? I suspect to entice people to want to pay for the images
         | that are being previewed. The question is now: given there are
         | different techniques, which techniques lead to a higher rate of
         | purchases of previewable content (right)?
        
       | oofabz wrote:
       | If you want to go even further, Imagemagick can operate on the
       | discrete Fourier transform of an image. The effects are
       | unintuitive but powerful. Read the documentation at:
       | 
       | https://legacy.imagemagick.org/Usage/fourier/#ft_application...
        
       | AndrewOMartin wrote:
       | This is a nice simple article exploring an interesting problem.
       | 
       | I hope they use a fixed seed for their random function when
       | probabilistically covering parts of the image.
       | 
       | If not it might mean one could refresh the image a few times and
       | get different parts covered. If so, you could then knit together
       | a full image by combining just the uncovered parts.
        
         | serjester wrote:
         | While I'm not an expert, stitching together images like that
         | seems like a far from a trivial problem.
        
           | donkarma wrote:
           | It might be an issue to automate but it should be pretty
           | simple manually
        
         | _def wrote:
         | There is no need to generate more than one.
        
         | hypertele-Xii wrote:
         | Doing the transform each time the image is requested would be
         | stupid. You'd do it once on upload.
        
       ___________________________________________________________________
       (page generated 2021-05-07 23:00 UTC)