提示コードですが//ここです
の行で以下のError部のエラー発生してしまいます。参考サイトのエラー原因サイトでlibheif
よりもlibde265`を先にインストールするとあるのですが(google 翻訳)
cmake コマンドを実行して
Visual studio プロジェクトを生成したのですがこの後どうやってインストールするのでしょうか?
インストールの方法がわかりません。`
環境
OS: windows 10 IDE: Visual studio 2022 make,cmake,インストール済み
実行したコマンド
libde265のread me のBuild using cmake
の以下のコマンドを実行
mkdir build cd build cmake ..
試したこと
プロジェクトを右クリックしてビルド、リビルド、実行を実行
参考サイト
libde265: https://github.com/strukturag/libde265
libheif: https://github.com/strukturag/libheif
エラー原因: https://github.com/strukturag/libheif/issues/121
Error
Unsupported feature: Unsupported codec
Source code
cpp
1#include <iostream> 2#include "Magick++/Image.h" 3#include "libheif/heif.h" 4 5int main(int argc, char const* argv[]) 6{ 7 heif_context* ctx = heif_context_alloc(); 8 heif_context_read_from_file(ctx, "image.HEIC", nullptr); 9 10 // get a handle to the primary image 11 heif_image_handle* handle; 12 heif_context_get_primary_image_handle(ctx, &handle); 13 14 // decode the image and convert colorspace to RGB, saved as 24bit interleaved 15 heif_image* img; 16 try 17 { 18 heif_error err = heif_decode_image(handle, &img, heif_colorspace_RGB, heif_chroma_interleaved_RGB,nullptr); 19 std::cout << err.message << std::endl; //ここです。 20 } 21 catch (std::exception e) 22 { 23 printf(e.what()); 24 } 25 26 27 int stride = 0; 28 //const uint8_t* data = heif_image_get_plane_readonly(img, heif_channel_interleaved, &stride); 29 30 heif_error err = heif_context_write_to_file(ctx, "test.jpeg"); 31 std::cout << err.message << std::endl; 32 33 return 0; 34} 35
あなたの回答
tips
プレビュー