Giter Club home page Giter Club logo

Comments (8)

dreampiggy avatar dreampiggy commented on June 19, 2024 1

Maybe the old generator based can not support animation. The new QLPreviewView (Which need a App, no longer a qlgenerator plugin) can custom draw anything on NSView

https://developer.apple.com/videos/play/wwdc2019/719?time=942
https://developer.apple.com/documentation/quicklookui/qlpreviewview
https://developer.apple.com/documentation/quicklook/qlpreviewingcontroller?language=objc

Maybe this is the future way to support animation.

from avifquicklook.

dreampiggy avatar dreampiggy commented on June 19, 2024

Emmm...QuickLook API design (from Apple) does not support Animated Image.
You see, it's received a CGContext (canvas, only draw one image), or CGImage (single frame)

We can only support to display animated AVIF into the static poster frame, is this enough for your use case ? @superbonaci

from avifquicklook.

dreampiggy avatar dreampiggy commented on June 19, 2024

For Preview (Space):
image

For Icon Thumbnail (See in Finder):
image

from avifquicklook.

superbonaci avatar superbonaci commented on June 19, 2024

Emmm...QuickLook API design (from Apple) does not support Animated Image.

I can play perfectly animated gif inside Quick Look (select the gif then Space Bar), for example this file: https://giphy.com/gifs/tag-sample-BfbUe877N4xsUhpcPc

ezgif-3-db1fd31a43

If I click the "Open with Preview" button then it displays a static image, but that's not what I meant.

from avifquicklook.

dreampiggy avatar dreampiggy commented on June 19, 2024

You don't realize that GIF is Apple's internal QuickLook Plugin, which does not use the public API.

As a non-Apple company employee, I can not do the similiar thing, because the public API does not contains this ability.

qlmanage -m plugins

image

qlmanage -p example.avif

Check the verbose log, which point into this `/System/Library/QuickLook/Image.qlgenerator`

from avifquicklook.

dreampiggy avatar dreampiggy commented on June 19, 2024

If possible, I can try to dis-assemble that Apple's Image.qlgenerator and see how they render Animation on CGContext. Maybe using a Timer to refresh the canvas ?

Or find their private API, which may contains something like frame count, duration, etc

from avifquicklook.

superbonaci avatar superbonaci commented on June 19, 2024

You don't realize that GIF is Apple's internal QuickLook Plugin, which does not use the public API.

You mean that GIF is AN internal QuickLook Plugin, not the only one. The video you quoted talks about thumbnails, just hope your app doesn't create such files. Viewing or previewing any file should not create any new file or "cache" in the filesystem.

I wonder if you can make this work as a "plugin" and not having to install a full .dmg program.

from avifquicklook.

dreampiggy avatar dreampiggy commented on June 19, 2024

Maybe it's just a AVIFQuickLook.app, you can place it into anywhere you like (Because Mac has a Spotlight service, will search all .app in your disk), like ~/Documents/Tools/AVIFQuickLook.app, you don't need to open it at all.

Then you can preview the AVIFs animation.

from avifquicklook.

Related Issues (15)

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.