Projects
Multimedia
transcode
transcode.ImageMagick-API.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File transcode.ImageMagick-API.patch of Package transcode
--- a/configure.in +++ b/configure.in @@ -1106,8 +1106,8 @@ dnl dnl ImageMagick dnl IMAGEMAGICK_EXTRA_LIBS="$IMAGEMAGICK_EXTRA_LIBS $($PKG_CONFIG --libs ImageMagick)" -TC_PKG_CHECK(imagemagick, no, IMAGEMAGICK, no, [magick/api.h], - none, InitializeMagick, Wand, [http://www.imagemagick.org/]) +TC_PKG_CHECK(imagemagick, no, IMAGEMAGICK, no, [magick/MagickCore.h], + none, InitializeMagick, MagickWand, [http://www.imagemagick.org/]) TC_PKG_HAVE(imagemagick, IMAGEMAGICK) if test x"$have_imagemagick" = x"yes" ; then SAVE_CPPFLAGS="$CPPFLAGS" --- a/export/export_im.c +++ b/export/export_im.c @@ -23,7 +23,7 @@ /* Note: because of ImageMagick bogosity, this must be included first, so * we can undefine the PACKAGE_* symbols it splats into our namespace */ -#include <magick/api.h> +#include <magick/MagickCore.h> #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING @@ -197,7 +197,11 @@ MOD_encode strlcpy(image->filename, buf2, MaxTextExtent); +#if MagickLibInterface > 1 + WriteImage(image_info, image, &exception_info); +#else WriteImage(image_info, image); +#endif DestroyImage(image); return(0); --- a/filter/filter_compare.c +++ b/filter/filter_compare.c @@ -24,7 +24,7 @@ /* Note: because of ImageMagick bogosity, this must be included first, so * we can undefine the PACKAGE_* symbols it splats into our namespace */ -#include <magick/api.h> +#include <magick/MagickCore.h> #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING @@ -234,7 +234,9 @@ int tc_filter(frame_list_t *ptr_, char * compare[instance]->width, compare[instance]->height, GaussianFilter, +#if MagickLibInterface == 1 1, +#endif &exception_info); if (verbose > 1) tc_log_info(MOD_NAME, "Flipping the Image"); @@ -245,6 +247,7 @@ int tc_filter(frame_list_t *ptr_, char * exception_info.description); } +#if 1 // Filling the matrix with the pixels values not // alpha @@ -275,6 +278,7 @@ int tc_filter(frame_list_t *ptr_, char * } } } +#endif if (verbose) tc_log_info(MOD_NAME, "%s %s", --- a/filter/filter_logo.c +++ b/filter/filter_logo.c @@ -36,7 +36,7 @@ /* Note: because of ImageMagick bogosity, this must be included first, so * we can undefine the PACKAGE_* symbols it splats into our namespace */ -#include <magick/api.h> +#include <magick/MagickCore.h> #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING @@ -573,7 +573,7 @@ int tc_filter(frame_list_t *ptr_, char * /* Set up image/video coefficient lookup tables */ if (img_coeff_lookup[0] < 0) { int i; - float maxrgbval = (float)MaxRGB; // from ImageMagick + float maxrgbval = QuantumRange; // from ImageMagick for (i = 0; i <= MAX_UINT8_VAL; i++) { float x = (float)ScaleCharToQuantum(i); @@ -705,13 +705,13 @@ int tc_filter(frame_list_t *ptr_, char * opacity = pixel_packet->opacity; if (do_fade) - opacity += (Quantum)((MaxRGB - opacity) * fade_coeff); + opacity += (Quantum)((QuantumRange - opacity) * fade_coeff); if (opacity == 0) { *(video_buf + r_off) = ScaleQuantumToChar(pixel_packet->red); *(video_buf + g_off) = ScaleQuantumToChar(pixel_packet->green); *(video_buf + b_off) = ScaleQuantumToChar(pixel_packet->blue); - } else if (opacity < MaxRGB) { + } else if (opacity < QuantumRange) { unsigned char opacity_uchar = ScaleQuantumToChar(opacity); img_coeff = img_coeff_lookup[opacity_uchar]; vid_coeff = vid_coeff_lookup[opacity_uchar]; @@ -748,7 +748,7 @@ int tc_filter(frame_list_t *ptr_, char * opacity = pixel_packet->opacity; if (do_fade) - opacity += (Quantum)((MaxRGB - opacity) * fade_coeff); + opacity += (Quantum)((QuantumRange - opacity) * fade_coeff); if (opacity == 0) { *vid_pixel_Y = *img_pixel_Y; @@ -756,7 +756,7 @@ int tc_filter(frame_list_t *ptr_, char * *vid_pixel_U = *img_pixel_U; *vid_pixel_V = *img_pixel_V; } - } else if (opacity < MaxRGB) { + } else if (opacity < QuantumRange) { unsigned char opacity_uchar = ScaleQuantumToChar(opacity); img_coeff = img_coeff_lookup[opacity_uchar]; vid_coeff = vid_coeff_lookup[opacity_uchar]; --- a/filter/filter_logoaway.c +++ b/filter/filter_logoaway.c @@ -70,7 +70,7 @@ /* Note: because of ImageMagick bogosity, this must be included first, so * we can undefine the PACKAGE_* symbols it splats into our namespace */ -#include <magick/api.h> +#include <magick/MagickCore.h> #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING @@ -204,7 +204,11 @@ static void work_with_rgb_frame(logoaway LD->dumpimage = ConstituteImage(LD->width-LD->xpos, LD->height-LD->ypos, "RGB", CharPixel, LD->dump_buf, &LD->exception_info); tc_snprintf(LD->dumpimage->filename, MaxTextExtent, "dump[%d].png", LD->id); +#if MagickLibInterface > 1 + WriteImage(LD->dumpimage_info, LD->dumpimage, &LD->exception_info); +#else WriteImage(LD->dumpimage_info, LD->dumpimage); +#endif } switch(LD->mode) {
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.