Click here to Skip to main content
14,599,577 members

How do I extract image collection from a HEIF container and vice versa ?

Member 13674745 asked:

Open original thread
HEIF is not so new container format that allows the compression of multiple images, their colour profiles and thumbnails. Microsoft has recently added support to Windows 10 with HEIF Image Extensions that only decodes the master image in the container.

Other C++ libraries exist online like libheif allowing for more control over this type of containers.

I need help packing this library (or a similar one with such features) into a Windows Runtime Component (C++/WinRT) to be reffered in other projects (My project is a C# UWP)

What I have tried:

- I have tried packaging the source code in a new Windows Runtime Component project inside VS 2019 by importing the files: i got hundreads of errors!
- I tried using CMake GUI tool to convert leibheif into a sln project: process could not be compleated - still trying to find out the cause!
- tried opening the Cmake project in VS and edit the header file with the:
extern "C" __declspec(dllexport) struct heif_context* heif_context_alloc(void);

then tried to build the DLL file... could not call any function in my project when using the:
[DllImport("ms-appx:///libheif.dll")]

I have tried this and this and this ... for almost 6 months i have still no answer on how to approach this .... any help ? I would greatly appretiate it if someone can make an open source C# library !

p.s. I am not making projects for profit. i am just trying to make something others can find useful .. no money, advertisment or anything similar is involved.
Tags: C++, C#, WinRT, UWP

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100