GithubHelp home page GithubHelp logo

imagedecoder.raw's Introduction

License: GPL-2.0-or-later Build Status Build Status

imagedecoder.raw addon for Kodi

This is a Kodi image decoder addon for RAW images.

Addon based on LibRaw for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, MOS, KDC, DCR and others; virtually all RAW formats are supported).

Build instructions

When building the addon you have to use the correct branch depending on which version of Kodi you're building against. If you want to build the addon to be compatible with the latest kodi master commit, you need to checkout the branch with the current kodi codename. Also make sure you follow this README from the branch in question.

Linux

The following instructions assume you will have built Kodi already in the kodi-build directory suggested by the README.

  1. git clone --branch master https://github.com/xbmc/xbmc.git
  2. git clone --branch Nexus https://github.com/xbmc/imagedecoder.raw.git
  3. cd imagedecoder.raw && mkdir build && cd build
  4. cmake -DADDONS_TO_BUILD=imagedecoder.raw -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/kodi-build/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons
  5. make

The addon files will be placed in ../../xbmc/kodi-build/addons so if you build Kodi from source and run it directly the addon will be available as a system addon.

imagedecoder.raw's People

Contributors

akva2 avatar alwinesch avatar lrusak avatar notspiff avatar phunkyfish avatar rechi avatar thexai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imagedecoder.raw's Issues

Building with gcc 7[.3.0] fails

While building, gcc 7.3.0 complains error as follows:

internal/dcraw_common.cpp: In function ‘float _CanonConvertAperture(ushort)’:
internal/dcraw_common.cpp:5779:29: error: call of overloaded ‘powf64(double, double)’ is ambiguous
   return powf64(2.0, in/64.0);
                             ^ 
In file included from /usr/arm-linux-gnueabihf/include/c++/7/cmath:45:0,
                 from /usr/arm-linux-gnueabihf/include/c++/7/math.h:36, 
                 from internal/dcraw_common.cpp:22:
/usr/arm-linux-gnueabihf/include/bits/mathcalls.h:140:1: note: candidate: _Float64 powf64(_Float64, _Float64)
 __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
 ^
internal/dcraw_common.cpp:5755:14: note: candidate: float powf64(float, float)
 static float powf64(float a, float b)
              ^~~~~~

and stopped

Probably this commit will fix the issue

ios/tvos build failure - zlib

Just raising an issue, that again is one of those "only appears when all addons built" kind of failures.

An example failure is https://jenkins.kodi.tv/job/iOS-ARM64-StaticAnalysis/564/

The failure is

13:22:02 Undefined symbols for architecture arm64:
13:22:02   "_uncompress", referenced from:
13:22:02       LibRaw::deflate_dng_load_raw() in libraw_r.a(fp_dng.o)
13:22:02 ld: symbol(s) not found for architecture arm64
13:22:02 clang: error: linker command failed with exit code 1 (use -v to see invocation)
13:22:02 make[7]: *** [imagedecoder.raw.21.0.0.dylib] Error 1

This is actually because zlib isnt linked. The build of libraw has a search for zlib (https://github.com/LibRaw/LibRaw/blob/a4c9b1981ee4ac2a144e7a290988428cc5bb7e85/configure.ac#L98-L106) that we do not explicitly enable/disable. Therefore if another addon builds zlib first, it finds it, but the actual imagedecoder.raw build doesnt add the -lz link flag, therefore causing the build failure.

Couple options i can see.

  1. explicitly disable zlib (--enable-zlib=no) in the libraw configure command
    CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} AR=${CMAKE_AR}
    ${CMAKE_SOURCE_DIR}/configure
    --disable-examples
    --disable-shared
    --disable-jasper
    --disable-openmp
    --enable-jpeg
    --with-pic
    --prefix=${OUTPUT_DIR}
  2. Add zlib as a build dependency to the addon for all platforms, and also explicitly enable zlib --enable-zlib=yes in the libraw configure command
  3. just toss on a -lz link flag for darwin_embedded and forget about it

Digitial Negatives support (.dng)

What about .dng files? It seems that imagedecoder.raw works for .dng if libraw is compiled with jpg support.

 --enable-jpeg    Enable JPEG support for Lossy compressed DNG files

also the mimetype and file extension need to be added to the addon.xml

Canon CR2 raw image Decoder crash/error

When Opening a CR2 RAW Picture (Source: Canon EOS 400D) from my external USB Drive with the RAW Image Decoder Plugin, Libreelec looks like freezing and after a while it restarts Libreelec (assumption because welcome screen appears again). No thumbnail neither any "exif" data is shown.

Tested with my Raspberry Pi 3 and the latest RAW Image Decoder Plugin from Official Repository:

  • v8.95.2 Beta
  • v8.90.009 Alpha
  • v8.90.007 Alpha

Opening the same image on a Debian Desktop or Windows 10 image viewer works.

A Libreelec Forum Member also tried it with the following result:

Klojum: Your demo picture doesn't load for me in Kodi 18RC4 in Ubuntu Linux 1604. Kodi doesn't crash, but there is no thumbnail and no picture displayed. It does display on Ubuntu's own picture viewer, just lots of error entries in the log and this is spammed numerous times quite a lot...

Attached you find the image (*.CR2) and the log files in the *.zip: kodilog.zip

Thanks in advance

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.