Giter VIP home page Giter VIP logo

Comments (24)

hummingly avatar hummingly commented on May 29, 2024 2

Cool link, now i see and it makes sense. not sure why but using quality 1 still looks like crap

I think we need to implement a resizing algorithm with bilinear interpolation (cubic is probably overkill), which should smoothen out heavily resized thumbnails.

from allusion.

schroef avatar schroef commented on May 29, 2024 1

I noticed in master now that when using preview window (space) and then go to selected image overview. There is no thumbnail shown, console outputs error

Uncaught ReferenceError: require is not defined
    at Object.<anonymous> (thumbnailGenerator.worker.js:1)
    at n (thumbnailGenerator.worker.js:1)
    at Object.<anonymous> (thumbnailGenerator.worker.js:1)
    at n (thumbnailGenerator.worker.js:1)
    at Object.<anonymous> (thumbnailGenerator.worker.js:1)
    at n (thumbnailGenerator.worker.js:1)
    at Object.<anonymous> (thumbnailGenerator.worker.js:1)
    at n (thumbnailGenerator.worker.js:1)
    at Module.<anonymous> (thumbnailGenerator.worker.js:1)
    at n (thumbnailGenerator.worker.js:1)

Screen Shot 2019-10-04 at 22 10 49

I tried restarting since this was first time after 2 weeks for me that i tried it again. Didnt help.

PS i also noticed on launch nothing showed. Only when i changed view method to list or grid did the icons show. BUt perhaps thats due to old pref settings. After a restart they did show each time

from allusion.

schroef avatar schroef commented on May 29, 2024

PS can we set compression method or quality?

from allusion.

schroef avatar schroef commented on May 29, 2024

I also think something is off with the generation. When i use this image and scale it to the same size and use photoshop web export as jpg, the file is 54kb vs 154kb in Webp generated by the script.
If i use lower quality of about 50-60 in photoshop the thumbnail gets even smaller. I got 223Kb and it looked even better than the webp version
Flag_100x70_v8_NonEdit_dayshotv3_POSTPRO

from allusion.

hummingly avatar hummingly commented on May 29, 2024

I don't think it generates webp images. Could you look at the file name on the img tags in the web dev tools? From the code I have read it generates the file just smaller in the same file format.

from allusion.

schroef avatar schroef commented on May 29, 2024

It does generate webp files, that how i found the filesize is weird. This is the path the file has

<img src="/Users/romboutversluijs/Library/Application Support/Allusion/thumbnails/Flag_100x70_v8_NonEdit_dayshotv3_POSTPRO-18718088.webp">

from allusion.

hummingly avatar hummingly commented on May 29, 2024

The size difference can be explained that the quality stays at 100% with the current code. Do the missing images load when you refresh the app? Are they also webp files? Do those contain alpha?

from allusion.

RvanderLaan avatar RvanderLaan commented on May 29, 2024

Aha, if you don't specify a quality argument it does lossless compression. Adding a quality of 0.8 reduces it by a lot

from allusion.

RvanderLaan avatar RvanderLaan commented on May 29, 2024

The thumbnails are generated and stored after you first see them, so the first time they load as normal, then a thumbnail is generated. Then the next time the image appears after scrolling or reloading it will load the thumbnail

from allusion.

schroef avatar schroef commented on May 29, 2024

yeah i just did as well. THough i set quality: 0.9 but it looks like crap
Compression is really not as what they say. As far as i understaand it 0.9 stands for 90%
I looked at this page

from allusion.

RvanderLaan avatar RvanderLaan commented on May 29, 2024

Here is a nice web app where you can compare compression quality: https://squoosh.app/editor
75% doesn't look too bad to me

from allusion.

schroef avatar schroef commented on May 29, 2024

The thumbnails are generated and stored after you first see them, so the first time they load as normal, then a thumbnail is generated. Then the next time the image appears after scrolling or reloading it will load the thumbnail

Shouldnt show the generated version at first? Doing it afterwards sort of beats its purpose i think

from allusion.

hummingly avatar hummingly commented on May 29, 2024

With 85% you should have the perfect quality for lossy images. At this quality the human eye will barely see any difference (still high PSNR). That is assuming you do not resize the image. Resizing images will always lead to data loss.

from allusion.

schroef avatar schroef commented on May 29, 2024

Here is a nice web app where you can compare compression quality: https://squoosh.app/editor
75% doesn't look too bad to me

Cool link, now i see and it makes sense. not sure why but using quality 1 still looks like crap

from allusion.

RvanderLaan avatar RvanderLaan commented on May 29, 2024

Shouldnt show the generated version at first? Doing it afterwards sort of beats its purpose i think

But if it doesn't exist yet, you can't show it. And since it needs to load the image before generating the thumbnail anyways, we might as well show it then

from allusion.

schroef avatar schroef commented on May 29, 2024

Wait i dont understand, generating thumbs should make loading faster right. Thay why first load hi-res and then when you select or switch view generate low-res. I dont really get that flow?

from allusion.

RvanderLaan avatar RvanderLaan commented on May 29, 2024

That only happens when the thumbnail hasn't been generated yet, the very first time that the image comes into view. Once it exists, it won't show the original image anymore

from allusion.

schroef avatar schroef commented on May 29, 2024

I now see the quality change, first i see hi-res, than when i select than it turns into low-res

from allusion.

schroef avatar schroef commented on May 29, 2024

Cool link, now i see and it makes sense. not sure why but using quality 1 still looks like crap

I think we need to implement a resizing algorithm with bilinear interpolation (cubic is probably overkill), which should smoothen out heavily resized thumbnails.

I tried looking at that link i earlier send, didnt find the anything by looking for a method. Perhaps i need to a better search. They probably have a method since that web app is also doing it

from allusion.

schroef avatar schroef commented on May 29, 2024

I do see this for image smoothing
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingEnabled

from allusion.

hummingly avatar hummingly commented on May 29, 2024

Hmm maybe chrome also uses bilinear interpolation. I think the best solution is just like you said loading the original image in slide view.

from allusion.

schroef avatar schroef commented on May 29, 2024

Are these thumbnails somehow kept in some memory orso? WHen i check the path the folder is empty, but when i tell osx to go exactly to the file, than suddenly they do show?

On osx when can use a command "go to folder" when i use this path "file:///Users/romboutversluijs/Library/Application Support/Allusion/thumbnails/UI-Missing-Images-Overview-v3--885012707.webp" than the thumbnail shows in the folder. Before that the folder was empty. I even quite the application and reopened it. It still showd the webp path, yet no file in the folder. Untill i directly target the file with the "go to folder" command

from allusion.

RvanderLaan avatar RvanderLaan commented on May 29, 2024

Hmm not sure what's happening there. They should be stored on disk, not just in memory. For me they appear in my file explorer just fine, maybe Macs don't know what to do with the webp format

from allusion.

schroef avatar schroef commented on May 29, 2024

I think it did the same when i used JPG as format. Ill check it again.
But i do think we should generate the thumbs directly, otherwise i dont see the benefit of this. It also act a bit funky on when it does generate low res version. Sometimes its generated when selected othertimes only when i preview it using space. But other times it was created after i previewed the image using spcae?

from allusion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.