Nyx0uf / qlImageSize

QuickLook and Spotlight plugins to display the dimensions, size and DPI of an image in the title bar instead of the filename. Also preview some unsupported formats like WebP & bpg.
MIT License
1.19k stars 66 forks source link

WebP preview bug? #41

Closed toooonyy closed 1 year ago

toooonyy commented 5 years ago

The plugin works great except the display of webp files seems too small(see screenshot)

using 10.14.4

Expected behavior

using QlWebP.qlgenerator from https://github.com/Old-Geek/QlWebP Screen Shot 2019-04-17 at 20 01 14

Actual behavior

Screen Shot 2019-04-17 at 20 00 31

Please let me know if any samples or log files needed.

Nyx0uf commented 5 years ago

Can you send me the file please ?

toooonyy commented 5 years ago

@Nyx0uf https://0x0.st/zqXc.webp (the sample file) https://0x0.st/zqXT.webp (another one)

Nyx0uf commented 5 years ago

I have no problems displaying those files.

Can you run the following commands and paste the output mdls /path/to/file and qlmanage -d 4 -p /path/to/file

toooonyy commented 5 years ago

Here is the mdls info

kMDItemBitsPerSample               = 8
kMDItemColorSpace                  = "Y'CbCr"
kMDItemContentCreationDate         = 2019-04-07 09:49:48 +0000
kMDItemContentCreationDate_Ranking = 2019-04-07 00:00:00 +0000
kMDItemContentModificationDate     = 2019-04-07 09:50:00 +0000
kMDItemContentType                 = "public.webp"
kMDItemContentTypeTree             = (
    "public.webp",
    "public.item",
    "public.data",
    "public.image",
    "public.webp",
    "public.content"
)
kMDItemDateAdded                   = 2019-04-18 17:15:15 +0000
kMDItemDateAdded_Ranking           = 2019-04-18 00:00:00 +0000
kMDItemDisplayName                 = "01.webp"
kMDItemFSContentChangeDate         = 2019-04-07 09:50:00 +0000
kMDItemFSCreationDate              = 2019-04-07 09:49:48 +0000
kMDItemFSCreatorCode               = ""
kMDItemFSFinderFlags               = 0
kMDItemFSHasCustomIcon             = (null)
kMDItemFSInvisible                 = 0
kMDItemFSIsExtensionHidden         = 0
kMDItemFSIsStationery              = (null)
kMDItemFSLabel                     = 0
kMDItemFSName                      = "01.webp"
kMDItemFSNodeCount                 = (null)
kMDItemFSOwnerGroupID              = 20
kMDItemFSOwnerUserID               = 501
kMDItemFSSize                      = 4595858
kMDItemFSTypeCode                  = ""
kMDItemHasAlphaChannel             = 0
kMDItemInterestingDate_Ranking     = 2019-04-07 00:00:00 +0000
kMDItemKind                        = "Google's WebP"
kMDItemLogicalSize                 = 4595858
kMDItemPhysicalSize                = 4603904
kMDItemPixelCount                  = 27060000
kMDItemPixelHeight                 = 4125
kMDItemPixelWidth                  = 6560

Here is the qlmanage -d 4 -p

Testing Quick Look preview with files:
    /Users/TonyY/Downloads/01.webp
[DEBUG] Registering <QLGenerator Web.qlgenerator> for com.apple.webarchive
[DEBUG] Registering <QLGenerator Web.qlgenerator> for public.html
[DEBUG] Registering <QLGenerator Web.qlgenerator> for public.xhtml
[DEBUG] Registering <QLGenerator Web.qlgenerator> for public.svg-image
[DEBUG] Registering <QLGenerator Clippings.qlgenerator> for com.apple.finder.textclipping
[DEBUG] Registering <QLGenerator Clippings.qlgenerator> for com.apple.finder.pictclipping
[DEBUG] Registering <QLGenerator Clippings.qlgenerator> for com.apple.pict
[DEBUG] Registering <QLGenerator Clippings.qlgenerator> for com.apple.internet-location
[DEBUG] Registering <QLGenerator Package.qlgenerator> for com.apple.package
[DEBUG] Registering <QLGenerator Image.qlgenerator> for public.image
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/SceneKit.qlgenerator> for public.3d-content
[DEBUG] Registering <QLGenerator Text.qlgenerator> for public.plain-text
[DEBUG] Registering <QLGenerator Text.qlgenerator> for public.rtf
[DEBUG] Registering <QLGenerator Text.qlgenerator> for com.apple.rtfd
[DEBUG] Registering <QLGenerator Text.qlgenerator> for org.oasis-open.opendocument.text
[DEBUG] Registering <QLGenerator Text.qlgenerator> for com.apple.property-list
[DEBUG] Registering <QLGenerator Text.qlgenerator> for public.xml
[DEBUG] Registering <QLGenerator Font.qlgenerator> for public.font
[DEBUG] Registering <QLGenerator PDF.qlgenerator> for com.adobe.pdf
[DEBUG] Registering <QLGenerator Audio.qlgenerator> for public.audio
[DEBUG] Registering <QLGenerator StandardBundles.qlgenerator> for com.apple.application
[DEBUG] Registering <QLGenerator StandardBundles.qlgenerator> for com.apple.systempreference.prefpane
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/iBooks.qlgenerator> for org.idpf.epub-folder
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/iBooks.qlgenerator> for com.apple.ibooks-folder
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/iBooks.qlgenerator> for org.idpf.epub-container
[DEBUG] Registering <QLGenerator LivePhoto.qlgenerator> for com.apple.private.live-photo-bundle
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Security.qlgenerator> for public.x509-certificate
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Security.qlgenerator> for public.x509-printable-encoded-archive
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Security.qlgenerator> for com.rsa.pkcs-12
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Security.qlgenerator> for com.apple.keychain
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/iChat.qlgenerator> for com.apple.ichat.ichat
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/iChat.qlgenerator> for com.apple.ichat.transcript
[DEBUG] Registering <QLGenerator Movie.qlgenerator> for public.movie
[DEBUG] Registering <QLGenerator Bookmark.qlgenerator> for com.apple.safari.bookmark
[DEBUG] Registering <QLGenerator Bookmark.qlgenerator> for com.apple.safari.history
[DEBUG] Registering <QLGenerator iCal.qlgenerator> for com.apple.ical.bookmark
[DEBUG] Registering <QLGenerator iCal.qlgenerator> for com.apple.ical.bookmark.todo
[DEBUG] Registering <QLGenerator iCal.qlgenerator> for com.apple.ical.ics
[DEBUG] Registering <QLGenerator iCal.qlgenerator> for com.apple.ical.ics.event
[DEBUG] Registering <QLGenerator iCal.qlgenerator> for com.apple.ical.ics.todo
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Mail.qlgenerator> for com.apple.mail.email
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Mail.qlgenerator> for com.apple.mail.emlx
[DEBUG] Registering <QLGenerator EPS.qlgenerator> for com.adobe.encapsulated-postscript
[DEBUG] Registering <QLGenerator EPS.qlgenerator> for com.adobe.illustrator.ai-image
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for com.microsoft.word.doc
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for com.microsoft.word.dot
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for com.microsoft.word.stationery
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for com.microsoft.excel.xls
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for com.microsoft.excel.xlt
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for com.microsoft.powerpoint.ppt
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for com.microsoft.powerpoint.pot
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for com.microsoft.powerpoint.pps
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.wordprocessingml.document
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.wordprocessingml.template
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.wordprocessingml.document.macroenabled
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.wordprocessingml.template.macroenabled
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.spreadsheetml.sheet
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.spreadsheetml.template
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.spreadsheetml.sheet.macroenabled
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.spreadsheetml.template.macroenabled
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.presentationml.presentation
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.presentationml.template.macroenabled
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.presentationml.template
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.presentationml.presentation.macroenabled
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.presentationml.slideshow
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for org.openxmlformats.presentationml.slideshow.macroenabled
[DEBUG] Registering <QLGenerator /System/Library/QuickLook/Office.qlgenerator> for public.comma-separated-values-text
[DEBUG] Registering <QLGenerator Icon.qlgenerator> for com.apple.iconset
[DEBUG] Registering <QLGenerator Contact.qlgenerator> for public.vcard
[DEBUG] Registering <QLGenerator Contact.qlgenerator> for com.apple.addressbook.person
[DEBUG] Registering <QLGenerator Contact.qlgenerator> for com.apple.addressbook.group
[DEBUG] Registering <QLGenerator LocPDF.qlgenerator> for com.apple.localized-pdf-bundle
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.numbers.numbers
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.numbers.sffnumbers
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.numbers.numbers-tef
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.numbers.sfftemplate
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.numbers.template
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.pages.pages
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.pages.sffpages
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.pages.pages-tef
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.pages.sfftemplate
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.pages.template
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.keynote.key
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.keynote.key
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.keynote.sffkey
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.keynote.key-tef
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.keynote.sffkth
[DEBUG] Registering <QLGenerator /Library/QuickLook/iWork.qlgenerator> for com.apple.iwork.keynote.kth
[DEBUG] Registering <QLGenerator /Library/QuickLook/iBooksAuthor.qlgenerator> for com.apple.ibooksauthor.book
[DEBUG] Registering <QLGenerator /Users/TonyY/Library/QuickLook/qlImageSize.qlgenerator> for public.image
[DEBUG] Registering <QLGenerator /Users/TonyY/Library/QuickLook/qlImageSize.qlgenerator> for public.webp
[DEBUG] Registering <QLGenerator /Users/TonyY/Library/QuickLook/qlImageSize.qlgenerator> for com.google.webp
[DEBUG] Registering <QLGenerator /Users/TonyY/Library/QuickLook/qlImageSize.qlgenerator> for fr.whine.bpg
[DEBUG] Registering <QLGenerator /Users/TonyY/Library/QuickLook/qlImageSize.qlgenerator> for fr.whine.ppm
[DEBUG] Registering <QLGenerator /Users/TonyY/Library/QuickLook/qlImageSize.qlgenerator> for fr.whine.pbm
[DEBUG] Registering <QLGenerator /Users/TonyY/Library/QuickLook/qlImageSize.qlgenerator> for fr.whine.pgm
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for public.zip-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for com.rarlab.rar-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for org.7-zip.7-zip-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for cx.c3.lha-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for org.gnu.gnu-zip-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for org.gnu.gnu-zip-tar-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for public.bzip2-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for public.tar-bzip2-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for org.tukaani.xz-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for org.tukaani.xz-tar-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for public.tar-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for public.iso-image
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for org.gnu.gnu-tar-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for public.z-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for cx.c3.compress-tar-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for org.tukaani.lzma-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for com.apple.xar-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for cx.c3.arc-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for com.microsoft.cab-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for public.cpio-archive
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for com.apple.bom-compressed-cpio
[DEBUG] Registering <QLGenerator /Applications/eZip.app/Contents/Library/QuickLook/eZipQL.qlgenerator> for cx.c3.pax-archive
[DEBUG] Registering <QLGenerator /Applications/Evernote.app/Contents/Library/QuickLook/ENQuickLookGenerator.qlgenerator> for com.evernote.note-metadata2
[DEBUG] Registering <QLGenerator /Applications/TeX/BibDesk.app/Contents/Library/QuickLook/BibDesk.qlgenerator> for net.sourceforge.bibdesk.bdskcache
[DEBUG] Registering <QLGenerator /Applications/TeX/BibDesk.app/Contents/Library/QuickLook/BibDesk.qlgenerator> for org.tug.tex.bibtex
[DEBUG] Registering <QLGenerator /Applications/TeX/BibDesk.app/Contents/Library/QuickLook/BibDesk.qlgenerator> for net.sourceforge.bibdesk.webofscience
[DEBUG] Registering <QLGenerator /Applications/TeX/BibDesk.app/Contents/Library/QuickLook/BibDesk.qlgenerator> for net.sourceforge.bibdesk.ris
[DEBUG] Registering <QLGenerator /Applications/TeX/TeX Live Utility.app/Contents/Library/QuickLook/DVI.qlgenerator> for org.tug.tex.dvi
[DEBUG] Registering <QLGenerator /Applications/TeX/TeX Live Utility.app/Contents/Library/QuickLook/DVI.qlgenerator> for net.sourceforge.skim-app.dvi
[DEBUG] Registering <QLGenerator /Applications/TeX/TeX Live Utility.app/Contents/Library/QuickLook/DVI.qlgenerator> for com.mac.amaxwell.dvi
[DEBUG] Preview test for file:///Users/TonyY/Downloads/01.webp. Content type UTI: public.webp
[DEBUG] Loading <QLGenerator /Users/TonyY/Library/QuickLook/qlImageSize.qlgenerator>
2019-04-18 18:23:44.203 qlmanage[23349:5525594] +[IKImageContentView _clampImageAlphaTo01:colorSpace:] no CIImage passed in
2019-04-18 18:23:44.203 qlmanage[23349:5525594] IKImageView2 _updateContentForLayerUsingIOSurface Error: source rect and destination rect of tile being drawn are not the same
2019-04-18 18:23:45.258 qlmanage[23349:5525594] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8403, name = 'com.apple.coredrag'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2019-04-18 18:23:45.363 qlmanage[23349:5525594] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xb61f, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.

But this does open a proper displayed windows

Screen Shot 2019-04-18 at 18 19 12

Other information might be of interest to you

qlmanage -m | grep webp
  com.google.webp -> /Users/TonyY/Library/QuickLook/qlImageSize.qlgenerator (2.6.1 - loaded)
  public.webp -> /Users/TonyY/Library/QuickLook/qlImageSize.qlgenerator (2.6.1 - loaded)

I also run qlmanage -r cache qlmanage -r and restarting the finder before pressing the space bar, but still not working proper.


Added

It sometimes works, but can't be reliably reproduced and most of times does not. (space bar)

The qlmanage with -p seems to work everytime.