diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 13e30a6f32..34d916a31d 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -1,122 +1,121 @@ project (krita-and-all-its-deps) # # Build all dependencies for Krita and finally Krita itself. # Parameters: EXTERNALS_DOWNLOAD_DIR place to download all packages # INSTALL_ROOT place to install everything to # MXE_TOOLCHAIN: the toolchain file to cross-compile using MXE # # Example usage: cmake ..\kritadeposx -DEXTERNALS_DOWNLOAD_DIR=/dev2/d -DINSTALL_ROOT=/dev2/i -DWIN64_BUILD=TRUE -DBOOST_LIBRARYDIR=/dev2/i/lib -G "Visual Studio 11 Win64" cmake_minimum_required(VERSION 2.8.6) if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) message(FATAL_ERROR "Compiling in the source directory is not supported. Use for example 'mkdir build; cd build; cmake ..'.") endif (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) # Tools must be obtained to work with: include (ExternalProject) # allow specification of a directory with pre-downloaded # requirements if(NOT IS_DIRECTORY ${EXTERNALS_DOWNLOAD_DIR}) message(FATAL_ERROR "No externals download dir set. Use -DEXTERNALS_DOWNLOAD_DIR") endif() if(NOT IS_DIRECTORY ${INSTALL_ROOT}) message(FATAL_ERROR "No install dir set. Use -DINSTALL_ROOT") endif() set(TOP_INST_DIR ${INSTALL_ROOT}) set(EXTPREFIX "${TOP_INST_DIR}") set(CMAKE_PREFIX_PATH "${EXTPREFIX}") if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 14 2015 Win64") SET(GLOBAL_PROFILE -DCMAKE_MODULE_LINKER_FLAGS=/machine:x64 -DCMAKE_EXE_LINKER_FLAGS=/machine:x64 -DCMAKE_SHARED_LINKER_FLAGS=/machine:x64 -DCMAKE_STATIC_LINKER_FLAGS=/machine:x64 ) endif () message( STATUS "CMAKE_GENERATOR: ${CMAKE_GENERATOR}") message( STATUS "CMAKE_CL_64: ${CMAKE_CL_64}") set(GLOBAL_BUILD_TYPE RelWithDebInfo) set(GLOBAL_PROFILE ${GLOBAL_PROFILE} -DBUILD_TESTING=false) if (MSVC) set(GLOBAL_PROFILE ${GLOBAL_PROFILE} -DCMAKE_EXE_LINKER_FLAGS=/PROFILE -DCMAKE_SHARED_LINKER_FLAGS=/PROFILE) set(PATCH_COMMAND myptch) endif() if (MINGW) set(PATCH_COMMAND myptch) endif() if (MSYS) set(PATCH_COMMAND patch) set(GLOBAL_PROFILE ${GLOBAL_PROFILE} -DCMAKE_TOOLCHAIN_FILE=${MXE_TOOLCHAIN} -DCMAKE_FIND_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_SYSTEM_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include -DCMAKE_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include -DCMAKE_LIBRARY_PATH=${CMAKE_PREFIX_PATH}/lib -DZLIB_ROOT=${CMAKE_PREFIX_PATH} ) set(GLOBAL_AUTOMAKE_PROFILE --host=i686-pc-mingw32 ) endif() if (APPLE) set(GLOBAL_PROFILE ${GLOBAL_PROFILE} -DCMAKE_MACOSX_RPATH=ON -DKDE_SKIP_RPATH_SETTINGS=ON -DBUILD_WITH_INSTALL_RPATH=ON -DAPPLE_SUPPRESS_X11_WARNING=ON) set(PATCH_COMMAND patch) endif () if (UNIX AND NOT APPLE) set(LINUX true) set(PATCH_COMMAND patch) endif () # this list must be dependency-ordered if (MSVC) add_subdirectory( ext_patch ) add_subdirectory( ext_png2ico ) endif (MSVC) if (MINGW) add_subdirectory( ext_patch ) add_subdirectory( ext_png2ico ) endif (MINGW) add_subdirectory( ext_iconv ) add_subdirectory( ext_gettext ) add_subdirectory( ext_zlib ) add_subdirectory( ext_libxml2 ) add_subdirectory( ext_libxslt ) add_subdirectory( ext_boost ) add_subdirectory( ext_jpeg ) add_subdirectory( ext_tiff ) add_subdirectory( ext_png ) add_subdirectory( ext_eigen3 ) add_subdirectory( ext_expat ) # for exiv2 add_subdirectory( ext_exiv2 ) add_subdirectory( ext_ilmbase ) add_subdirectory( ext_lcms2 ) add_subdirectory( ext_openexr ) add_subdirectory( ext_vc ) add_subdirectory( ext_gsl ) add_subdirectory( ext_fftw3 ) add_subdirectory( ext_ocio ) -add_subdirectory( ext_openjpeg ) if (MSVC) add_subdirectory( ext_pthreads ) endif (MSVC) add_subdirectory( ext_fontconfig) add_subdirectory( ext_freetype) add_subdirectory( ext_qt ) add_subdirectory( ext_poppler ) add_subdirectory( ext_libraw ) add_subdirectory( ext_frameworks ) if (MSVC) add_subdirectory( google-breakpad ) endif() diff --git a/3rdparty/README.md b/3rdparty/README.md index d15871e69e..b6513b08c1 100644 --- a/3rdparty/README.md +++ b/3rdparty/README.md @@ -1,216 +1,215 @@ = CMake external projects to build krita's dependencies on Linux, Windows or OSX = If you need to build Krita's dependencies for the following reasons: * you develop on Windows and aren't using Emerge * you develop on OSX and aren't using Homebrew * you want to build a generic, distro-agnostic version of Krita for Linux * you develop on Linux, but some dependencies aren't available for your distribution and you know what you're doing, you can use the following guide to build the dependencies that Krita needs. If you develop on Linux and your distribution has the dependencies available, YOU DO NOT NEED THIS GUIDE AND YOU SHOULD STOP READING NOW Otherwise you risk major confusion. == Prerequisites == Note: on all operating systems the entire procedure is done in a terminal window. 1. git: https://git-scm.com/downloads. Make sure git is in your path 2. cmake 3.3.2: https://cmake.org/download/. Make sure cmake is in your path. 3. Make sure you have a compiler: * Linux: gcc, minimum version 4.8 * OSX: clang, you need to install xcode for this * Windows: (http://tdm-gcc.tdragon.net/, version 5.1). MSVC cannot build G'Mic correctly. For some reason, cmake wants to use nmake even when using mingw, so copy mingw32-make.exe to nmake.exe. And remember to install the OpenMP plugin in tdm-gcc. 4. If you compile Qt on Windows, you will also need Python 2.7: https://www.python.org/download/releases/2.7/. Make sure to have python.exe in your path. == Setup your environment == Windows Only: When launching the commands from the console, run first "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat" in it (include the quotes). This way all the environment variables for the compiler will be ready. == Prepare your directory layout == 1. Make a toplevel build directory, say $HOME/dev or c:\dev. We'll refer to this directory as BUILDROOT. You can use a variable for this, on WINDOWS %BUILDROOT%, on OSX and Linux $BUILDROOT. You will have to replace BUILDROOT with $BUILDROOT or %BUILDROOT whenever you copy and paste a command, depending on your operating system. 2. Checkout krita in BUILDROOT cd BUILDROOT git clone git://anongit.kde.org/krita.git 3. Create the build directory mkdir BUILDROOT/b 4. Create the downloads directory mkdir BUILDROOT/d 5. Create the install directory mkdir BUILDROOT/i == Prepare the externals build == 1. enter the BUILDROOT/b directory 2. run cmake: * Linux: export PATH=$BUILDROOT/i/bin cmake ../krita/3rdparty \ -DINSTALL_ROOT=$BUILDROOT/i \ -DEXTERNALS_DOWNLOAD_DIR=$BUILDROOT/d \ -DCMAKE_INSTALL_PREFIX=BUILDROOT/i * OSX: export PATH=$BUILDROOT/i/bin cmake ../krita/3rdparty/ \ -DCMAKE_INSTALL_PREFIX=$BUILDROOT/i \ -DEXTERNALS_DOWNLOAD_DIR=$BUILDROOT/d \ -DINSTALL_ROOT=$BUILDROOT/i * Windows 32 bits: TODO * Windows 64 bits: Note that the cmake command needs to point to your BUILDROOT like /dev/d, not c:\dev\d. set PATH=BUILDROOT\i\bin\;BUILDROOT\i\lib;%PATH% cmake ..\krita\3rdparty -DEXTERNALS_DOWNLOAD_DIR=/dev/d -DINSTALL_ROOT=/dev/i -G "MinGW Makefiles" 3. build the packages: With a judicious application of DEPENDS statements, it's possible to build it all in one go, but in my experience that fails always, so it's better to build the dependencies independently. On Windows: cmake --build . --config RelWithDebInfo --target ext_patch cmake --build . --config RelWithDebInfo --target ext_png2ico cmake --build . --config RelWithDebInfo --target ext_gettext On all operating systems: cmake --build . --config RelWithDebInfo --target ext_qt cmake --build . --config RelWithDebInfo --target ext_zlib cmake --build . --config RelWithDebInfo --target ext_boost cmake --build . --config RelWithDebInfo --target ext_eigen3 cmake --build . --config RelWithDebInfo --target ext_exiv2 cmake --build . --config RelWithDebInfo --target ext_fftw3 cmake --build . --config RelWithDebInfo --target ext_ilmbase cmake --build . --config RelWithDebInfo --target ext_jpeg cmake --build . --config RelWithDebInfo --target ext_lcms2 cmake --build . --config RelWithDebInfo --target ext_ocio cmake --build . --config RelWithDebInfo --target ext_openexr Note for OSX: On OSX, you need to first build openexr; that will fail; then you need to set the rpath for the two utilities correctly, then try to build openexr again. install_name_tool -add_rpath $BUILD_ROOT/i/lib $BUILD_ROOT/b/ext_openexr/ext_openexr-prefix/src/ext_openexr-build/IlmImf/./b44ExpLogTable install_name_tool -add_rpath $BUILD_ROOT/i/lib $BUILD_ROOT/b/ext_openexr/ext_openexr-prefix/src/ext_openexr-build/IlmImf/./dwaLookups On All operating systems: cmake --build . --config RelWithDebInfo --target ext_png cmake --build . --config RelWithDebInfo --target ext_tiff cmake --build . --config RelWithDebInfo --target ext_gsl cmake --build . --config RelWithDebInfo --target ext_vc cmake --build . --config RelWithDebInfo --target ext_libraw - cmake --build . --config RelWithDebInfo --target ext_openjpeg On Windows and OSX cmake --build . --config RelWithDebInfo --target ext_kcrash On Windows (Note: skip this for now if you're using msvc 2015, poppler isn't compatible with that compiler yet) cmake --build . --config RelWithDebInfo --target ext_freetype cmake --build . --config RelWithDebInfo --target ext_poppler On Linux cmake --build . --config RelWithDebInfo --target ext_kcrash Note: poppler should be buildable on Linux as well with a home-built freetype and fontconfig, but I don't know how to make fontconfig find freetype, and on Linux, fontconfig is needed for poppler. Poppler is needed for PDF import. Note 2: libcurl still isn't available. == Build Krita == 1. Make a krita build directory: mkdir BUILDROOT/build 2. Enter the BUILDROOT/build 3. Run On Windows Depending on what you want to use, run this command for MSBuild: cmake ..\krita -G "Visual Studio 14 Win64" -DBoost_DEBUG=OFF -DBOOST_INCLUDEDIR=c:\dev\i\include -DBOOST_DEBUG=ON -DBOOST_ROOT=c:\dev\i -DBOOST_LIBRARYDIR=c:\dev\i\lib -DCMAKE_INSTALL_PREFIX=c:\dev\i -DCMAKE_PREFIX_PATH=c:\dev\i -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DHAVE_MEMORY_LEAK_TRACKER=OFF -DPACKAGERS_BUILD=ON -Wno-dev -DDEFINE_NO_DEPRECATED=1 Or this to use jom (faster compiling, uses all cores, ships with QtCreator/pre-built Qt binaries): cmake ..\krita -G "NMake Makefiles" -DBoost_DEBUG=OFF -DBOOST_INCLUDEDIR=c:\dev\i\include -DBOOST_DEBUG=ON -DBOOST_ROOT=c:\dev\i -DBOOST_LIBRARYDIR=c:\dev\i\lib -DCMAKE_INSTALL_PREFIX=c:\dev\i -DCMAKE_PREFIX_PATH=c:\dev\i -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DHAVE_MEMORY_LEAK_TRACKER=OFF -DPACKAGERS_BUILD=ON -Wno-dev -DDEFINE_NO_DEPRECATED=1 On Linux cmake ../krita -DCMAKE_INSTALL_PREFIX=BUILDROOT/i -DDEFINE_NO_DEPRECATED=1 -DPACKAGERS_BUILD=ON -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfobg On OSX cmake ../krita -DCMAKE_INSTALL_PREFIX=/Users/boud/dev/i -DDEFINE_NO_DEPRECATED=1 -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DPACKAGERS_BUILD=ON -DBUNDLE_INSTALL_DIR=$HOME/dev/i/bin -DCMAKE_BUILD_TYPE=RelWithDebInfo 4. Run On Linux and OSX make make install On Windows Either use MSBuild to build (-- /m tells msbuild to use all your cores): cmake --build . --config RelWithDebInfo --target INSTALL -- /m Or use jom which should be in a path similar to C:\Qt\Qt5.6.0\Tools\QtCreator\bin\jom.exe. So, from the same folder, instead of running cmake run: "C:\Qt\Qt5.6.0\Tools\QtCreator\bin\jom.exe" install 6. Run krita: On Linux BUILDROOT/i/bin/krita On Windows BUILDROOT\i\bin\krita.exe On OSX BUILDROOT/i/bin/krita.app/Contents/MacOS/krita == Packaging a Windows Build == If you want to create a stripped down version of Krita to distribute, after building everything just copy the makepkg.bat file from the "windows" folder inside krita root source folder to BUILDROOT and run it. That will copy the necessary files into the specified folder and leave behind developer related files, so the resulting folder will be a smaller install folder. == Common Issues == - On Windows, if you get a 'mspdb140.dll' missing alert window, it means you did not run the bat file. Make sure to include the quotes in the command: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat" - On Windows, if you get an error about Qt5Core.dll missing/not found or nmake exit with an error that mention QT_PLUGIN_PATH, you have to copy a couple of dlls in the Qt build directory, look for the N.B. in the Qt instructions at the start of the Readme. - If you receive an error while compiling about "missing QtCore5.cmake", or something similar, check to make sure qmake is in your PATH. Restart your command line after any changes are made. diff --git a/3rdparty/ext_openjpeg/CMakeLists.txt b/3rdparty/ext_openjpeg/CMakeLists.txt deleted file mode 100755 index 3e34540089..0000000000 --- a/3rdparty/ext_openjpeg/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -SET(PREFIX_ext_openjpeg "${EXTPREFIX}" ) -ExternalProject_Add( ext_openjpeg - DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} - URL http://files.kde.org/krita/build/dependencies/openjpeg-version.2.1.tar.gz - URL_MD5 3e1c451c087f8462955426da38aa3b3d - - INSTALL_DIR ${PREFIX_ext_openjpeg} - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_openjpeg} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} - - UPDATE_COMMAND "" - ALWAYS 0 - DEPENDS ext_png ext_tiff ext_lcms2 ext_zlib -) - diff --git a/cmake/modules/FindOpenJPEG.cmake b/cmake/modules/FindOpenJPEG.cmake deleted file mode 100644 index ae859572e9..0000000000 --- a/cmake/modules/FindOpenJPEG.cmake +++ /dev/null @@ -1,56 +0,0 @@ -# -*- cmake -*- - -# - Find OpenJPEG -# Find the OpenJPEG includes and library -# This module defines -# OPENJPEG_INCLUDE_DIR, where to find openjpeg.h, etc. -# OPENJPEG_LIBRARIES, the libraries needed to use OpenJPEG. -# OPENJPEG_FOUND, If false, do not try to use OpenJPEG. -# also defined, but not for general use are -# OPENJPEG_LIBRARY, where to find the OpenJPEG library. - -find_path(OPENJPEG_INCLUDE_DIR openjpeg.h -PATHS - /usr/local/include/openjpeg - /usr/local/include - /usr/include/openjpeg - /usr/include/openjpeg-1.5 - /usr/include -PATH_SUFFIXES - openjpeg-1.5 - openjpeg -) - -set(OPENJPEG_NAMES ${OPENJPEG_NAMES} openjpeg) -find_library(OPENJPEG_LIBRARY - NAMES ${OPENJPEG_NAMES} - PATHS - /usr/lib /usr/local/lib -) - -if (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR) - set(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY}) - set(OPENJPEG_FOUND "YES") -else () - set(OPENJPEG_FOUND "NO") -endif () - - -if (OPENJPEG_FOUND) - if (NOT OPENJPEG_FIND_QUIETLY) - message(STATUS "Found OpenJPEG: ${OPENJPEG_LIBRARIES}") - endif () -else () - if (OPENJPEG_FIND_REQUIRED) - message(FATAL_ERROR "Could not find OpenJPEG library") - endif () -endif () - -# Deprecated declarations. -set (NATIVE_OPENJPEG_INCLUDE_PATH ${OPENJPEG_INCLUDE_DIR} ) -get_filename_component (NATIVE_OPENJPEG_LIB_PATH ${OPENJPEG_LIBRARY} PATH) - -mark_as_advanced( - OPENJPEG_LIBRARY - OPENJPEG_INCLUDE_DIR - ) diff --git a/plugins/impex/CMakeLists.txt b/plugins/impex/CMakeLists.txt index 9b44d8c1a6..7571851366 100644 --- a/plugins/impex/CMakeLists.txt +++ b/plugins/impex/CMakeLists.txt @@ -1,47 +1,43 @@ project(kritafilters) if(CMAKE_SIZEOF_VOID_P EQUAL 4) add_definitions( -DCPU_32_BITS ) endif() if(JPEG_FOUND AND HAVE_LCMS2) add_subdirectory(jpeg) endif() if(TIFF_FOUND) add_subdirectory(tiff) endif() if(PNG_FOUND) add_subdirectory(png) add_subdirectory(csv) endif() if(OPENEXR_FOUND) add_subdirectory(exr) endif() if(POPPLER_FOUND) add_subdirectory(pdf) endif() -if(OPENJPEG_FOUND) - add_subdirectory(jp2) -endif() - if(LIBRAW_FOUND) add_subdirectory(raw) endif() add_subdirectory(bmp) add_subdirectory(ora) add_subdirectory(ppm) add_subdirectory(xcf) add_subdirectory(psd) add_subdirectory(odg) add_subdirectory(qml) add_subdirectory(tga) add_subdirectory(heightmap) add_subdirectory(brush) add_subdirectory(spriter) add_subdirectory(video) diff --git a/plugins/impex/jp2/CMakeLists.txt b/plugins/impex/jp2/CMakeLists.txt deleted file mode 100644 index 0b885a99a7..0000000000 --- a/plugins/impex/jp2/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -include_directories(SYSTEM ${OPENJPEG_INCLUDE_DIR}) - -set(libkritaconverter_LIB_SRCS - jp2_converter.cc -) - -set(kritajp2import_SOURCES - jp2_import.cc - ${libkritaconverter_LIB_SRCS} - ) - -add_library(kritajp2import MODULE ${kritajp2import_SOURCES}) - -target_link_libraries(kritajp2import kritaui ${OPENJPEG_LIBRARIES} ) - -install(TARGETS kritajp2import DESTINATION ${KRITA_PLUGIN_INSTALL_DIR}) - -set(kritajp2export_SOURCES - jp2_export.cc - ${libkritaconverter_LIB_SRCS} -) - -ki18n_wrap_ui(kritajp2export_SOURCES kis_wdg_options_jp2.ui ) - -add_library(kritajp2export MODULE ${kritajp2export_SOURCES}) - -target_link_libraries(kritajp2export kritaui ${OPENJPEG_LIBRARIES} ) - -install(TARGETS kritajp2export DESTINATION ${KRITA_PLUGIN_INSTALL_DIR}) -install( PROGRAMS krita_jp2.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) diff --git a/plugins/impex/jp2/jp2_converter.cc b/plugins/impex/jp2/jp2_converter.cc deleted file mode 100644 index 11cc175634..0000000000 --- a/plugins/impex/jp2/jp2_converter.cc +++ /dev/null @@ -1,468 +0,0 @@ -/* - * Copyright (c) 2009 Cyrille Berger - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "jp2_converter.h" - -#include - -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include "kis_iterator_ng.h" - -jp2Converter::jp2Converter(KisDocument *doc) -{ - m_doc = doc; - m_stop = false; -} - -jp2Converter::~jp2Converter() -{ -} - -/** - * sample error callback expecting a FILE* client object - * */ -void -error_callback(const char *msg, void *client_data) -{ - FILE *stream = (FILE *) client_data; - fprintf(stream, "[ERROR] %s", msg); -} - -/** - * sample warning callback expecting a FILE* client object - * */ -void -warning_callback(const char *msg, void *client_data) -{ - FILE *stream = (FILE *) client_data; - fprintf(stream, "[WARNING] %s", msg); -} - -/** - * sample debug callback expecting no client object - * */ -void -info_callback(const char *msg, void *client_data) -{ - Q_UNUSED(client_data); - fprintf(stdout, "[INFO] %s", msg); -} - -KisImageBuilder_Result jp2Converter::decode(const QString &filename) -{ - // decompression parameters - opj_dparameters_t parameters; - opj_set_default_decoder_parameters(¶meters); - // Determine the type - parameters.decod_format = getFileFormat(filename); // TODO isn't there some magic code ? - if (parameters.decod_format == -1) { - return KisImageBuilder_RESULT_UNSUPPORTED; - } - // open the file - QFile fp(filename); - fp.open(QIODevice::ReadOnly); - QByteArray src = fp.readAll(); - fp.close(); - // Decode the file - opj_dinfo_t *dinfo = 0; - - bool hasColorSpaceInfo = false; - /* get a decoder handle */ - switch (parameters.decod_format) { - case J2K_CFMT: { - dinfo = opj_create_decompress(CODEC_J2K); - break; - } - case JP2_CFMT: { - dinfo = opj_create_decompress(CODEC_JP2); - hasColorSpaceInfo = true; - break; - } - case JPT_CFMT: { - dinfo = opj_create_decompress(CODEC_JPT); - break; - } - } - Q_ASSERT(dinfo); - - /* setup the decoder decoding parameters using user parameters */ - opj_setup_decoder(dinfo, ¶meters); - - /* open a byte stream */ - opj_cio_t *cio = opj_cio_open((opj_common_ptr) dinfo, (unsigned char*)src.data(), src.length()); - - // Setup an event manager - opj_event_mgr_t event_mgr; /* event manager */ - memset(&event_mgr, 0, sizeof(opj_event_mgr_t)); - event_mgr.error_handler = error_callback; - event_mgr.warning_handler = warning_callback; - event_mgr.info_handler = info_callback; - - /* catch events using our callbacks and give a local context */ - opj_set_event_mgr((opj_common_ptr) dinfo, &event_mgr, stderr); - - /* decode the stream and fill the image structure */ - opj_image_t *image = opj_decode(dinfo, cio); - - /* close the byte stream */ - opj_cio_close(cio); - if (!image) { - opj_destroy_decompress(dinfo); - return KisImageBuilder_RESULT_FAILURE; - } - - // Look for the colorspace - int components = image->numcomps; - if (image->numcomps == 0) { - opj_destroy_decompress(dinfo); - return KisImageBuilder_RESULT_FAILURE; - } - int bitdepth = image->comps[0].bpp; - for (int i = 1; i < components; ++i) { - if (image->comps[i].bpp != bitdepth) { - opj_destroy_decompress(dinfo); - return KisImageBuilder_RESULT_FAILURE; - } - } - dbgFile << "Image has " << components << " components and a bit depth of " << bitdepth << " for color space " << image->color_space; - if (bitdepth == 0) { - bitdepth = 8; - } - const KoColorSpace* colorSpace = 0; - QVector channelorder(components); - if (!hasColorSpaceInfo) { - if (components == 3) { - image->color_space = CLRSPC_SRGB; - } else if (components == 1) { - image->color_space = CLRSPC_GRAY; - } - } - switch (image->color_space) { - case CLRSPC_UNKNOWN: - break; - case CLRSPC_SRGB: { - if (bitdepth == 16) { - colorSpace = KoColorSpaceRegistry::instance()->rgb16(); - } else if (bitdepth == 8) { - colorSpace = KoColorSpaceRegistry::instance()->rgb8(); - } - if (components != 3) { - opj_destroy_decompress(dinfo); - return KisImageBuilder_RESULT_FAILURE; - } - channelorder[0] = KoBgrU16Traits::red_pos; - channelorder[1] = KoBgrU16Traits::green_pos; - channelorder[2] = KoBgrU16Traits::blue_pos; - break; - } - case CLRSPC_GRAY: { - if (bitdepth == 16) { - colorSpace = KoColorSpaceRegistry::instance()->colorSpace( GrayAColorModelID.id(), Integer16BitsColorDepthID.id(), ""); - } else if (bitdepth == 8) { - colorSpace = KoColorSpaceRegistry::instance()->colorSpace(GrayAColorModelID.id(), Integer8BitsColorDepthID.id(), ""); - } - if (components != 1) { - opj_destroy_decompress(dinfo); - return KisImageBuilder_RESULT_FAILURE; - } - channelorder[0] = 0; - break; - } - case CLRSPC_SYCC: { - if (bitdepth == 16) { - colorSpace = KoColorSpaceRegistry::instance()->colorSpace( "YUV", Integer16BitsColorDepthID.id(), ""); - } else if (bitdepth == 8) { - colorSpace = KoColorSpaceRegistry::instance()->colorSpace("YUV", Integer8BitsColorDepthID.id(), ""); - } - if (components != 3) { - opj_destroy_decompress(dinfo); - return KisImageBuilder_RESULT_FAILURE; - } - channelorder[0] = 0; - channelorder[1] = 1; - channelorder[2] = 2; - break; - } - default: - ; - } - if (!colorSpace) { - dbgFile << "No colors space found for that image"; - return KisImageBuilder_RESULT_FAILURE; - } - - // Create the image - if (m_image == 0) { - m_image = new KisImage(m_doc->createUndoStore(), image->x1, image->y1, colorSpace, "built image"); - } - - // Create the layer - KisPaintLayerSP layer = new KisPaintLayer(m_image.data(), m_image->nextLayerName(), OPACITY_OPAQUE_U8); - m_image->addNode(layer.data(), m_image->rootLayer().data()); - - // Set the data - int pos = 0; - KisHLineIteratorSP it = layer->paintDevice()->createHLineIteratorNG(0, 0, image->x1); - for (int v = 0; v < image->y1; ++v) { - if (bitdepth == 16) { - do { - quint16* px = reinterpret_cast(it->rawData()); - for (int i = 0; i < components; ++i) { - px[channelorder[i]] = image->comps[i].data[pos]; - } - colorSpace->setOpacity(it->rawData(), OPACITY_OPAQUE_U8, 1); - ++pos; - - } while (it->nextPixel()); - } else if (bitdepth == 8) { - do { - quint8* px = reinterpret_cast(it->rawData()); - for (int i = 0; i < components; ++i) { - px[channelorder[i]] = image->comps[i].data[pos]; - } - colorSpace->setOpacity(px, OPACITY_OPAQUE_U8, 1); - ++pos; - - } while (it->nextPixel()); - } - it->nextRow(); - } - - return KisImageBuilder_RESULT_OK; -} - - - -KisImageBuilder_Result jp2Converter::buildImage(const QString &filename) -{ - return decode(filename); -} - - -KisImageWSP jp2Converter::getImage() -{ - return m_image; -} - - -KisImageBuilder_Result jp2Converter::buildFile(const QString &filename, KisPaintLayerSP layer, const JP2ConvertOptions& options) -{ - if (!layer) - return KisImageBuilder_RESULT_INVALID_ARG; - - KisImageWSP kisimage = layer->image(); - if (!kisimage) - return KisImageBuilder_RESULT_EMPTY; - - // Init parameters - opj_cparameters_t parameters; - opj_set_default_encoder_parameters(¶meters); - parameters.cp_comment = (char*)"Created by Krita"; - parameters.subsampling_dx = 1; - parameters.subsampling_dy = 1; - parameters.cp_disto_alloc = 1; - parameters.tcp_numlayers = 1; - parameters.numresolution = options.numberresolution; - dbgFile << 100 - options.rate; - parameters.tcp_rates[0] = options.rate; - - - // Set the colorspace information - OPJ_COLOR_SPACE clrspc; - int components; - QVector channelorder; - if (layer->colorSpace()->colorModelId() == GrayAColorModelID || layer->colorSpace()->colorModelId() == GrayColorModelID) { - clrspc = CLRSPC_GRAY; - components = 1; - channelorder.resize(components); - channelorder[0] = 0; - } else if (layer->colorSpace()->colorModelId() == RGBAColorModelID) { - clrspc = CLRSPC_SRGB; - components = 3; - channelorder.resize(components); - channelorder[0] = KoBgrU16Traits::red_pos; - channelorder[1] = KoBgrU16Traits::green_pos; - channelorder[2] = KoBgrU16Traits::blue_pos; - } else { - QMessageBox::critical(0, i18nc("@title:window", "Krita"), i18n("Cannot export images in %1.\n", layer->colorSpace()->name())) ; - return KisImageBuilder_RESULT_FAILURE; - } - - int bitdepth; - if (layer->colorSpace()->colorDepthId() == Integer8BitsColorDepthID) { - bitdepth = 8; -// TODO OpenJpeg does not really support 16bits yet -// } else if (layer->colorSpace()->colorDepthId() == Integer16BitsColorDepthID) { -// bitdepth = 16; - } else { - QMessageBox::critical(0, i18nc("@title:window", "Krita"), i18n("Cannot export images in %1.\n", layer->colorSpace()->name())) ; - return KisImageBuilder_RESULT_FAILURE; - } - - // Init the image - opj_image_cmptparm_t image_info[3]; - - int width = kisimage->width(); - int height = kisimage->height(); - for (int k = 0; k < components; k++) { - image_info[k].dx = 1; - image_info[k].dy = 1; - image_info[k].w = width; - image_info[k].h = height; - image_info[k].x0 = 0; - image_info[k].y0 = 0; - image_info[k].prec = 8; - image_info[k].bpp = bitdepth; - image_info[k].sgnd = 0; - } - opj_image_t *image = opj_image_create(components, image_info, clrspc); - image->x1 = width; - image->y1 = height; - image->x0 = 0; - image->y0 = 0; - - // Copy the data in the image - int pos = 0; - KisHLineIteratorSP it = layer->paintDevice()->createHLineIteratorNG(0, 0, image->x1); - for (int v = 0; v < height; ++v) { - if (bitdepth == 16) { - do { - quint16* px = reinterpret_cast(it->rawData()); - for (int i = 0; i < components; ++i) { - image->comps[i].data[pos] = px[channelorder[i]]; - } - ++pos; - - } while (it->nextPixel()); - } else if (bitdepth == 8) { - do { - quint8* px = reinterpret_cast(it->rawData()); - for (int i = 0; i < components; ++i) { - image->comps[i].data[pos] = px[channelorder[i]]; - } - ++pos; - - } while (it->nextPixel()); - } - it->nextRow(); - } - - // coding format - parameters.decod_format = getFileFormat(filename); // TODO isn't there some magic code ? - - // Decode the file - opj_cinfo_t *cinfo = 0; - - /* get a decoder handle */ - switch (parameters.decod_format) { - case J2K_CFMT: { - cinfo = opj_create_compress(CODEC_J2K); - break; - } - case JP2_CFMT: { - cinfo = opj_create_compress(CODEC_JP2); - break; - } - case JPT_CFMT: { - cinfo = opj_create_compress(CODEC_JPT); - break; - } - } - - if (!cinfo) { - // Could not create compression info object - return KisImageBuilder_RESULT_FAILURE; - } - - // Setup an event manager - opj_event_mgr_t event_mgr; /* event manager */ - memset(&event_mgr, 0, sizeof(opj_event_mgr_t)); - event_mgr.error_handler = error_callback; - event_mgr.warning_handler = warning_callback; - event_mgr.info_handler = info_callback; - - /* catch events using our callbacks and give a local context */ - opj_set_event_mgr((opj_common_ptr) cinfo, &event_mgr, stderr); - - - /* setup the encoder parameters using the current image and using user parameters */ - opj_setup_encoder(cinfo, ¶meters, image); - - opj_cio_t* cio = opj_cio_open((opj_common_ptr) cinfo, 0, 0); - - - /* encode the image */ - if (!opj_encode(cinfo, cio, image, parameters.index)) { - opj_cio_close(cio); - opj_destroy_compress(cinfo); - return KisImageBuilder_RESULT_FAILURE; - } - - // Write to the file - QFile fp(filename); - fp.open(QIODevice::WriteOnly); - int length = cio_tell(cio); - dbgFile << "Length of the file to save: " << length; - fp.write((char*)cio->buffer, length); - fp.close(); - - opj_cio_close(cio); - opj_destroy_compress(cinfo); - - return KisImageBuilder_RESULT_OK; -} - - -void jp2Converter::cancel() -{ - m_stop = true; -} - -int jp2Converter::getFileFormat(const QString &filename) const -{ - QString extension = QFileInfo(filename).suffix().toLower(); - if (extension == "j2k" || extension == "j2c") { - return J2K_CFMT; - } else if (extension == "jp2") { - return JP2_CFMT; - } else if (extension == "jpt") { - return JPT_CFMT; - } - return -1; -} - - diff --git a/plugins/impex/jp2/jp2_converter.h b/plugins/impex/jp2/jp2_converter.h deleted file mode 100644 index cb24aa7b24..0000000000 --- a/plugins/impex/jp2/jp2_converter.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2009 Cyrille Berger - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _JP2_CONVERTER_H_ -#define _JP2_CONVERTER_H_ - -#include - -#include - -#include "kis_types.h" -#include -class KisDocument; - -struct JP2ConvertOptions { - int rate; - int numberresolution; -}; - -class jp2Converter : public QObject -{ - Q_OBJECT -private: - enum { - J2K_CFMT = 0, - JP2_CFMT = 1, - JPT_CFMT = 2 - }; -public: - jp2Converter(KisDocument *doc); - virtual ~jp2Converter(); -public: - KisImageBuilder_Result buildImage(const QString &filename); - KisImageBuilder_Result buildFile(const QString &filename, KisPaintLayerSP layer, const JP2ConvertOptions& options); - /** - * Retrieve the constructed image - */ - KisImageWSP getImage(); -private: - KisImageBuilder_Result decode(const QString &filename); -public Q_SLOTS: - virtual void cancel(); -private: - int getFileFormat(const QString &filename) const; -private: - KisImageWSP m_image; - KisDocument *m_doc; - bool m_stop; -}; - -#endif diff --git a/plugins/impex/jp2/jp2_export.cc b/plugins/impex/jp2/jp2_export.cc deleted file mode 100644 index a7f92b35a2..0000000000 --- a/plugins/impex/jp2/jp2_export.cc +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2009 Cyrille Berger - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "jp2_export.h" - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "jp2_converter.h" - -#include "ui_kis_wdg_options_jp2.h" - -class KisExternalLayer; - -K_PLUGIN_FACTORY_WITH_JSON(ExportFactory, "krita_jp2_export.json", registerPlugin();) - -jp2Export::jp2Export(QObject *parent, const QVariantList &) : KisImportExportFilter(parent) -{ -} - -jp2Export::~jp2Export() -{ -} - -KisImportExportFilter::ConversionStatus jp2Export::convert(const QByteArray& from, const QByteArray& to) -{ - dbgFile << "JP2 export! From:" << from << ", To:" << to << ""; - - if (from != "application/x-krita") - return KisImportExportFilter::NotImplemented; - - KisDocument *input = inputDocument(); - QString filename = outputFile(); - - if (!input) - return KisImportExportFilter::NoDocumentCreated; - - KisImageWSP image = input->image(); - Q_CHECK_PTR(image); - - if (filename.isEmpty()) return KisImportExportFilter::FileNotFound; - - KoDialog* kdb = new KoDialog(0); - kdb->setWindowTitle(i18n("JPEG 2000 Export Options")); - kdb->setButtons(KoDialog::Ok | KoDialog::Cancel); - - Ui::WdgOptionsJP2 optionsJP2; - - QWidget* wdg = new QWidget(kdb); - optionsJP2.setupUi(wdg); - - QString filterConfig = KisConfig().exportConfiguration("JP2"); - KisPropertiesConfiguration cfg; - cfg.fromXML(filterConfig); - optionsJP2.numberResolutions->setValue(cfg.getInt("number_resolutions", 6)); - optionsJP2.qualityLevel->setValue(cfg.getInt("quality", 100)); - - kdb->setMainWidget(wdg); - QApplication::restoreOverrideCursor(); - - if (!getBatchMode()) { - if (kdb->exec() == QDialog::Rejected) { - return KisImportExportFilter::UserCancelled; - } - } - - JP2ConvertOptions options; - options.numberresolution = optionsJP2.numberResolutions->value(); - cfg.setProperty("number_resolutions", options.numberresolution); - options.rate = optionsJP2.qualityLevel->value(); - cfg.setProperty("quality", options.rate); - - KisConfig().setExportConfiguration("JP2", cfg); - - - // the image must be locked at the higher levels - KIS_SAFE_ASSERT_RECOVER_NOOP(input->image()->locked()); - jp2Converter kpc(input); - - KisPaintDeviceSP pd = new KisPaintDevice(*image->projection()); - KisPaintLayerSP l = new KisPaintLayer(image, "projection", OPACITY_OPAQUE_U8, pd); - - KisImageBuilder_Result res; - - if ((res = kpc.buildFile(filename, l, options)) == KisImageBuilder_RESULT_OK) { - dbgFile << "success !"; - return KisImportExportFilter::OK; - } - dbgFile << " Result =" << res; - return KisImportExportFilter::InternalError; -} - -#include - diff --git a/plugins/impex/jp2/jp2_export.h b/plugins/impex/jp2/jp2_export.h deleted file mode 100644 index d55ef897fe..0000000000 --- a/plugins/impex/jp2/jp2_export.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2009 Cyrille Berger - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _JP2_EXPORT_H_ -#define _JP2_EXPORT_H_ - -#include - -#include - -class jp2Export : public KisImportExportFilter -{ - Q_OBJECT -public: - jp2Export(QObject *parent, const QVariantList &); - virtual ~jp2Export(); -public: - virtual KisImportExportFilter::ConversionStatus convert(const QByteArray& from, const QByteArray& to); -}; - -#endif diff --git a/plugins/impex/jp2/jp2_import.cc b/plugins/impex/jp2/jp2_import.cc deleted file mode 100644 index 2cf66afa54..0000000000 --- a/plugins/impex/jp2/jp2_import.cc +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2009 Cyrille Berger - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "jp2_import.h" - -#include -#include - -#include - -#include -#include - -#include "jp2_converter.h" - -K_PLUGIN_FACTORY_WITH_JSON(ImportFactory, "krita_jp2_import.json", registerPlugin();) - -jp2Import::jp2Import(QObject *parent, const QVariantList &) : KisImportExportFilter(parent) -{ -} - -jp2Import::~jp2Import() -{ -} - -KisImportExportFilter::ConversionStatus jp2Import::convert(const QByteArray&, const QByteArray& to) -{ - dbgFile << "Importing using JP2Import!"; - - if (to != "application/x-krita") - return KisImportExportFilter::BadMimeType; - - KisDocument * doc = outputDocument(); - - if (!doc) - return KisImportExportFilter::NoDocumentCreated; - - QString filename = inputFile(); - - doc->prepareForImport(); - - if (!filename.isEmpty()) { - - jp2Converter ib(doc); - - switch (ib.buildImage(filename)) { - case KisImageBuilder_RESULT_UNSUPPORTED: - return KisImportExportFilter::NotImplemented; - break; - case KisImageBuilder_RESULT_INVALID_ARG: - return KisImportExportFilter::BadMimeType; - break; - case KisImageBuilder_RESULT_NO_URI: - case KisImageBuilder_RESULT_NOT_LOCAL: - return KisImportExportFilter::FileNotFound; - break; - case KisImageBuilder_RESULT_BAD_FETCH: - case KisImageBuilder_RESULT_EMPTY: - return KisImportExportFilter::ParsingError; - break; - case KisImageBuilder_RESULT_FAILURE: - return KisImportExportFilter::InternalError; - break; - case KisImageBuilder_RESULT_OK: - doc -> setCurrentImage(ib.getImage()); - return KisImportExportFilter::OK; - default: - break; - } - - } - return KisImportExportFilter::StorageCreationError; -} - -#include - diff --git a/plugins/impex/jp2/jp2_import.h b/plugins/impex/jp2/jp2_import.h deleted file mode 100644 index fd51b67f40..0000000000 --- a/plugins/impex/jp2/jp2_import.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2009 Cyrille Berger - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef JP2_IMPORT_H_ -#define JP2_IMPORT_H_ - -#include - -#include - -class jp2Import : public KisImportExportFilter -{ - Q_OBJECT -public: - jp2Import(QObject *parent, const QVariantList &); - virtual ~jp2Import(); -public: - virtual KisImportExportFilter::ConversionStatus convert(const QByteArray& from, const QByteArray& to); -}; - -#endif diff --git a/plugins/impex/jp2/kis_wdg_options_jp2.ui b/plugins/impex/jp2/kis_wdg_options_jp2.ui deleted file mode 100644 index da40c9d2ea..0000000000 --- a/plugins/impex/jp2/kis_wdg_options_jp2.ui +++ /dev/null @@ -1,146 +0,0 @@ - - - WdgOptionsJP2 - - - - 0 - 0 - 400 - 300 - - - - - - - - - Compression - - - - - - - <html><head/><body><p>These settings determine how much information is lost during compression. Low: small files, bad quality. High: big files, good quality.</p></body></html> - - - 0 - - - 100 - - - 10 - - - 1 - - - 100 - - - Qt::Horizontal - - - QSlider::TicksBelow - - - 10 - - - - - - - 100 - - - 0 - - - 100 - - - - - - - - - - - Number of resolutions: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 1 - - - 20 - - - 6 - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - qualityLevel - valueChanged(int) - intQuality - setValue(int) - - - 322 - 22 - - - 367 - 19 - - - - - intQuality - valueChanged(int) - qualityLevel - setValue(int) - - - 373 - 21 - - - 328 - 18 - - - - - diff --git a/plugins/impex/jp2/krita_jp2.desktop b/plugins/impex/jp2/krita_jp2.desktop deleted file mode 100644 index e7ca394f71..0000000000 --- a/plugins/impex/jp2/krita_jp2.desktop +++ /dev/null @@ -1,120 +0,0 @@ -[Desktop Entry] -Categories=Qt;KDE;Office;Graphics; -Exec=krita %u -GenericName=Application for Drawing and Handling of Images -GenericName[bg]=Приложение за рисуване и обработка на изображения -GenericName[bs]=Aplikacija za crtanje i upravljanje slikom -GenericName[ca]=Aplicació per a dibuix i modificació d'imatges -GenericName[ca@valencia]=Aplicació per a dibuix i modificació d'imatges -GenericName[da]=Tegne- og billedbehandlingsprogram -GenericName[de]=Programm zum Zeichnen und Bearbeiten von Bildern -GenericName[el]=Εφαρμογή για επεξεργασία και χειρισμό εικόνων -GenericName[en_GB]=Application for Drawing and Handling of Images -GenericName[eo]=Aplikaĵo por Desegnado kaj Mastrumado de Bildoj -GenericName[es]=Aplicación para dibujo y manipulación de imágenes -GenericName[et]=Joonistamise ja pilditöötluse rakendus -GenericName[eu]=Irudiak marrazteko eta manipulatzeko aplikazioa -GenericName[fa]=کاربرد برای ترسیم و به کار بردن تصاویر -GenericName[fi]=Ohjelma kuvien piirtämiseen ja käsittelyyn -GenericName[fr]=Application pour dessiner et manipuler des images -GenericName[fy]=Aplikaasje om ôfbyldings mei te tekenjen en te bewurkjen -GenericName[ga]=Feidhmchlár le haghaidh Líníochta agus Láimhseála Íomhánna -GenericName[gl]=Aplicativo de debuxo e edición de imaxes -GenericName[he]=יישום לצביעה וניהול תמונות -GenericName[hi]=छवियों को ड्रा करने तथा उन्हें प्रबन्धित करने का अनुप्रयोग -GenericName[hne]=फोटू मन ल ड्रा करे अउ ओ मन ल प्रबन्धित करे के अनुपरयोग -GenericName[hu]=Rajzoló és képkezelő -GenericName[is]=Teikni og myndvinnsluforrit -GenericName[it]=Applicazione di disegno e gestione di immagini -GenericName[kk]=Кескінді салу және өңдеу бағдарламасы -GenericName[ko]=그림 그리기 및 처리 프로그램 -GenericName[lv]=Programma zīmēšanai un attēlu apstrādei -GenericName[nb]=Program for tegning og bildehåndtering -GenericName[nds]=Programm för't Teken un Bildhanteren -GenericName[ne]=रेखाचित्र बनाउन र छविको ह्यान्डल गर्नका लागि अनुप्रयोग -GenericName[nl]=Toepassing om afbeeldingen te tekenen en te bewerken -GenericName[pl]=Program do rysowania i obróbki obrazów -GenericName[pt]=Aplicação de Desenho e Manipulação de Imagens -GenericName[pt_BR]=Aplicativo de desenho e manipulação de imagens -GenericName[ru]=Растровые изображения -GenericName[sk]=Aplikácia na kresnenie a manilupáciu s obrázkami -GenericName[sl]=Program za risanje in rokovanje s slikami -GenericName[sv]=Program för att rita och hantera bilder -GenericName[ta]=பிம்பங்களை கையாளுதல் மற்றும் வரைதலுக்கான பயன்னாடு -GenericName[tr]=Çizim ve Resim İşleme Uygulaması -GenericName[uk]=Програма для малювання і обробки зображень -GenericName[uz]=Rasm chizish dasturi -GenericName[uz@cyrillic]=Расм чизиш дастури -GenericName[wa]=Programe po dessiner et apougnî des imådjes -GenericName[x-test]=xxApplication for Drawing and Handling of Imagesxx -GenericName[zh_CN]=绘制和操纵图像的应用程序 -GenericName[zh_TW]=影像繪製與處理應用程式 -Icon=calligrakrita -MimeType=image/jp2; -Name=Krita -Name[af]=Krita -Name[bg]=Krita -Name[br]=Krita -Name[bs]=Krita -Name[ca]=Krita -Name[ca@valencia]=Krita -Name[cs]=Krita -Name[cy]=Krita -Name[da]=Krita -Name[de]=Krita -Name[el]=Krita -Name[en_GB]=Krita -Name[eo]=Krita -Name[es]=Krita -Name[et]=Krita -Name[eu]=Krita -Name[fi]=Krita -Name[fr]=Krita -Name[fy]=Krita -Name[ga]=Krita -Name[gl]=Krita -Name[he]=Krita -Name[hi]=केरिता -Name[hne]=केरिता -Name[hr]=Krita -Name[hu]=Krita -Name[ia]=Krita -Name[is]=Krita -Name[it]=Krita -Name[kk]=Krita -Name[ko]=Krita -Name[lt]=Krita -Name[lv]=Krita -Name[mr]=क्रिटा -Name[ms]=Krita -Name[nb]=Krita -Name[nds]=Krita -Name[ne]=क्रिता -Name[nl]=Krita -Name[pl]=Krita -Name[pt]=Krita -Name[pt_BR]=Krita -Name[ro]=Krita -Name[ru]=Krita -Name[se]=Krita -Name[sk]=Krita -Name[sl]=Krita -Name[sv]=Krita -Name[ta]=கிரிட்டா -Name[tg]=Krita -Name[tr]=Krita -Name[ug]=Krita -Name[uk]=Krita -Name[uz]=Krita -Name[uz@cyrillic]=Krita -Name[wa]=Krita -Name[xh]=Krita -Name[x-test]=xxKritaxx -Name[zh_CN]=Krita -Name[zh_TW]=繪圖_Krita -StartupNotify=true -Terminal=false -Type=Application -X-KDE-SubstituteUID=false -X-KDE-Username= -NoDisplay=true diff --git a/plugins/impex/jp2/krita_jp2_export.json b/plugins/impex/jp2/krita_jp2_export.json deleted file mode 100644 index 5b91b4d7b0..0000000000 --- a/plugins/impex/jp2/krita_jp2_export.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "Icon": "", - "Id": "Krita jp2 Export Filter", - "Type": "Service", - "X-KDE-Export": "image/jp2", - "X-KDE-Import": "application/x-krita", - "X-KDE-Library": "kritajp2export", - "X-KDE-ServiceTypes": [ - "Krita/FileFilter" - ], - "X-KDE-Weight": "1", - "X-KDE-Extensions" : "jp2" -} diff --git a/plugins/impex/jp2/krita_jp2_import.json b/plugins/impex/jp2/krita_jp2_import.json deleted file mode 100644 index ade36b72cd..0000000000 --- a/plugins/impex/jp2/krita_jp2_import.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "Icon": "", - "Id": "Krita jp2 Import Filter", - "Type": "Service", - "X-KDE-Export": "application/x-krita", - "X-KDE-Import": "image/jp2", - "X-KDE-Library": "kritajp2import", - "X-KDE-ServiceTypes": [ - "Krita/FileFilter" - ], - "X-KDE-Weight": "1", - "X-KDE-Extensions" : "jp2" -}