aseprite/src/desktop
David Capello aeeef8e255 Add suppor for doc::Image row stride size > width size
This patch solves several problems introducing the possibility to
specify a row stride bigger than the width (visible pixels) on each
image row. Useful in case that we want to align the initial pixel
address of each row (if DOC_USE_ALIGNED_PIXELS is defined).

This allows us to use some SIMD intrinsics (e.g. SSE2) for some image
functions in the future (right now implemented only in the new
is_same_image_simd_templ() for is_same_image()).

Anyway to avoid breaking some existing code, by default we'll still
keep the old behavior: row stride bytes = width bytes (so
DOC_USE_ALIGNED_PIXELS is undefined).
2023-08-07 15:27:39 -03:00
..
linux Normalize some cmake options from WITH_* to ENABLE_* 2021-12-15 17:47:44 -03:00
osx Add suppor for doc::Image row stride size > width size 2023-08-07 15:27:39 -03:00
win [win] Fix aseprite-thumbnailer with new changes from a66c170ded 2022-08-18 13:53:20 -03:00
CMakeLists.txt [osx] Add QuickLook plugin to generate thumbnails and previews (#834, #3615) 2022-12-08 12:05:17 -03:00
LICENSE.txt [osx] Add QuickLook plugin to generate thumbnails and previews (#834, #3615) 2022-12-08 12:05:17 -03:00
README.md [osx] Add QuickLook plugin to generate thumbnails and previews (#834, #3615) 2022-12-08 12:05:17 -03:00

Desktop Integration

MIT Licensed

Windows

On Windows we have to create a COM server in a DLL to provide thumbnails. The DLL must provide an IThumbnailProvider implementation. Our implementation is in desktop::ThumbnailHandler class, the most interesting member function is ThumbnailHandler::GetThumbnail(), which should return a HBITMAP of the thumbnail.

Registering the DLL

If you distribute your app in an installer remember to use regsvr32.exe to register your DLL which will call your DLL's DllRegisterServer(), a function that must create registry keys to associate your file type extension with your thumbnail handler.

More information in the MSDN.

macOS

On macOS we have to create a QuickLook plugin/extension to display thumbnails and previews. The plugin is a .qlgenerator bundle which can be installed in the ~/Library/QuickLook, /System/Library/QuickLook, or /Library/QuickLook directories, or included the in the same app bundle.

macOS pre-10.15, has a COM-like functionality to load QuickLook plugins: the QuickLook daemon will use the information in our bundle Info.plist to know which function to load and call from our library to create the plugin object. (The function generally is called QuickLookGeneratorPluginFactory but can has any name, the name is specified in a child element of CFPlugInFactories inside the Info.plist file.) Then the created object is used abstractly as a IUnknown, and the QLGeneratorInterface interface is queried to generate then thumbnails and previews.

We can test our .qlgenerator without installing it using the qlmanage utility.

We target to macOS 10.9, but we should migrate to the new macOS 10.15 API in a near future (or provide both).