Changeset View
Changeset View
Standalone View
Standalone View
plugins/impex/jpeg/kis_jpeg_converter.cc
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | |||||
81 | 81 | | |||
82 | void jpegErrorExit ( j_common_ptr cinfo ) | 82 | void jpegErrorExit ( j_common_ptr cinfo ) | ||
83 | { | 83 | { | ||
84 | char jpegLastErrorMsg[JMSG_LENGTH_MAX]; | 84 | char jpegLastErrorMsg[JMSG_LENGTH_MAX]; | ||
85 | /* Create the message */ | 85 | /* Create the message */ | ||
86 | ( *( cinfo->err->format_message ) ) ( cinfo, jpegLastErrorMsg ); | 86 | ( *( cinfo->err->format_message ) ) ( cinfo, jpegLastErrorMsg ); | ||
87 | 87 | | |||
88 | /* Jump to the setjmp point */ | 88 | /* Jump to the setjmp point */ | ||
89 | throw std::runtime_error( jpegLastErrorMsg ); // or your preffered exception ... | 89 | throw std::runtime_error( jpegLastErrorMsg ); // or your preferred exception ... | ||
90 | } | 90 | } | ||
91 | 91 | | |||
92 | J_COLOR_SPACE getColorTypeforColorSpace(const KoColorSpace * cs) | 92 | J_COLOR_SPACE getColorTypeforColorSpace(const KoColorSpace * cs) | ||
93 | { | 93 | { | ||
94 | if (KoID(cs->id()) == KoID("GRAYA") || cs->id() == "GRAYAU16" || cs->id() == "GRAYA16") { | 94 | if (KoID(cs->id()) == KoID("GRAYA") || cs->id() == "GRAYAU16" || cs->id() == "GRAYA16") { | ||
95 | return JCS_GRAYSCALE; | 95 | return JCS_GRAYSCALE; | ||
96 | } | 96 | } | ||
97 | if (KoID(cs->id()) == KoID("RGBA") || KoID(cs->id()) == KoID("RGBA16")) { | 97 | if (KoID(cs->id()) == KoID("RGBA") || KoID(cs->id()) == KoID("RGBA16")) { | ||
▲ Show 20 Lines • Show All 635 Lines • Show Last 20 Lines |