Changeset 424 for MagickWandForPHP
- Timestamp:
- 10/21/09 07:46:08 (5 months ago)
- Location:
- MagickWandForPHP/trunk
- Files:
-
- 2 modified
-
ChangeLog (modified) (2 diffs)
-
magickwand.c (modified) (43 diffs)
Legend:
- Unmodified
- Added
- Removed
-
MagickWandForPHP/trunk/ChangeLog
r1 r424 30 30 31 31 2007-02-12 1.0.0-0 Cristy <omicronpersei8@image...> 32 * Deprecate MagickGetImage Attribute()/MagickSetImageAttribute(), use32 * Deprecate MagickGetImageProperty()/MagickSetImageAttribute(), use 33 33 MagickGetImageProperty()/MagickSetImageProperty() instead. 34 34 … … 1047 1047 - MagickWand for PHP v0.1.4 has a minimum requirement of ImageMagick-6.2.1-1 1048 1048 1049 - Added the new MagickWand C API functions MagickGetImage Attribute(),1049 - Added the new MagickWand C API functions MagickGetImageProperty(), 1050 1050 MagickIdentifyImage() and MagickSepiaToneImage(). 1051 1051 -
MagickWandForPHP/trunk/magickwand.c
r1 r424 148 148 php_stream_close(stream); 149 149 150 if ( MagickSetI mageIndex( magick_wand, (long) orig_img_idx ) == MagickTrue ) {150 if ( MagickSetIteratorIndex( magick_wand, (long) orig_img_idx ) == MagickTrue ) { 151 151 while ( MagickSetImageFilename( magick_wand, (char *) NULL ), MagickNextImage( magick_wand ) == MagickTrue ) 152 152 ; … … 234 234 } 235 235 236 img_idx = (long) MagickGetI mageIndex( magick_wand );236 img_idx = (long) MagickGetIteratorIndex( magick_wand ); 237 237 if ( MagickGetExceptionType(magick_wand) == UndefinedException ) { 238 238 img_idx++; … … 242 242 if ( MagickReadImage( magick_wand, real_magick_format ) == MagickTrue ) { 243 243 244 if ( MagickSetI mageIndex( magick_wand, (long) img_idx ) == MagickTrue ) {244 if ( MagickSetIteratorIndex( magick_wand, (long) img_idx ) == MagickTrue ) { 245 245 246 246 num_imgs = ((unsigned long) MagickGetNumberImages( magick_wand )) - num_imgs - 1; … … 287 287 } 288 288 else { 289 img_idx = (long) MagickGetI mageIndex( magick_wand );289 img_idx = (long) MagickGetIteratorIndex( magick_wand ); 290 290 } 291 291 … … 298 298 MW_DEBUG_NOTICE_EX( "The image \"%s\" was read successfully", real_filename ); 299 299 300 if ( MagickSetI mageIndex( magick_wand, (long) img_idx ) == MagickTrue ) {300 if ( MagickSetIteratorIndex( magick_wand, (long) img_idx ) == MagickTrue ) { 301 301 302 302 if ( set_wand_format == MagickTrue ) { … … 2175 2175 /* }}} */ 2176 2176 2177 /* {{{ proto float DrawGetFill Alpha( DrawingWand draw_wand )2177 /* {{{ proto float DrawGetFillOpacity( DrawingWand draw_wand ) 2178 2178 */ 2179 2179 PHP_FUNCTION( drawgetfillalpha ) … … 2181 2181 MW_PRINT_DEBUG_INFO 2182 2182 2183 MW_GET_WAND_RET_DOUBLE( DrawingWand, DrawGetFill Alpha);2183 MW_GET_WAND_RET_DOUBLE( DrawingWand, DrawGetFillOpacity ); 2184 2184 } 2185 2185 /* }}} */ … … 2285 2285 /* }}} */ 2286 2286 2287 /* {{{ proto float DrawGetStroke Alpha( DrawingWand draw_wand )2287 /* {{{ proto float DrawGetStrokeOpacity( DrawingWand draw_wand ) 2288 2288 */ 2289 2289 PHP_FUNCTION( drawgetstrokealpha ) … … 2291 2291 MW_PRINT_DEBUG_INFO 2292 2292 2293 MW_GET_WAND_RET_DOUBLE( DrawingWand, DrawGetStroke Alpha);2293 MW_GET_WAND_RET_DOUBLE( DrawingWand, DrawGetStrokeOpacity ); 2294 2294 } 2295 2295 /* }}} */ … … 3093 3093 /* }}} */ 3094 3094 3095 /* {{{ proto void DrawSetFill Alpha( DrawingWand draw_wand, float fill_opacity )3095 /* {{{ proto void DrawSetFillOpacity( DrawingWand draw_wand, float fill_opacity ) 3096 3096 */ 3097 3097 PHP_FUNCTION( drawsetfillalpha ) … … 3099 3099 MW_PRINT_DEBUG_INFO 3100 3100 3101 MW_GET_WAND_SET_NORMALIZED_COLOR( DrawingWand, DrawSetFill Alpha);3101 MW_GET_WAND_SET_NORMALIZED_COLOR( DrawingWand, DrawSetFillOpacity ); 3102 3102 } 3103 3103 /* }}} */ … … 3262 3262 /* }}} */ 3263 3263 3264 /* {{{ proto void DrawSetStroke Alpha( DrawingWand draw_wand, float stroke_opacity )3264 /* {{{ proto void DrawSetStrokeOpacity( DrawingWand draw_wand, float stroke_opacity ) 3265 3265 */ 3266 3266 PHP_FUNCTION( drawsetstrokealpha ) … … 3268 3268 MW_PRINT_DEBUG_INFO 3269 3269 3270 MW_GET_WAND_SET_NORMALIZED_COLOR( DrawingWand, DrawSetStroke Alpha);3270 MW_GET_WAND_SET_NORMALIZED_COLOR( DrawingWand, DrawSetStrokeOpacity ); 3271 3271 } 3272 3272 /* }}} */ … … 4011 4011 /* }}} */ 4012 4012 4013 /* {{{ proto bool MagickClip PathImage( MagickWand magick_wand, string pathname, bool inside )4013 /* {{{ proto bool MagickClipImagePath( MagickWand magick_wand, string pathname, bool inside ) 4014 4014 */ 4015 4015 PHP_FUNCTION( magickclippathimage ) … … 4029 4029 MW_GET_POINTER_FROM_RSRC( MagickWand, magick_wand, &magick_wand_rsrc_zvl_p ); 4030 4030 4031 MW_BOOL_FUNC_RETVAL_BOOL( MagickClip PathImage( magick_wand, path_name, MW_MK_MGCK_BOOL(clip_inside) ) );4031 MW_BOOL_FUNC_RETVAL_BOOL( MagickClipImagePath( magick_wand, path_name, MW_MK_MGCK_BOOL(clip_inside) ) ); 4032 4032 } 4033 4033 /* }}} */ … … 4545 4545 /* }}} */ 4546 4546 4547 /* {{{ proto string Magick DescribeImage( MagickWand magick_wand )4547 /* {{{ proto string MagickIdentifyImage( MagickWand magick_wand ) 4548 4548 */ 4549 4549 PHP_FUNCTION( magickdescribeimage ) … … 4551 4551 MW_PRINT_DEBUG_INFO 4552 4552 4553 MW_GET_WAND_RETVAL_STRING( MagickWand, Magick DescribeImage );4553 MW_GET_WAND_RETVAL_STRING( MagickWand, MagickIdentifyImage ); 4554 4554 } 4555 4555 /* }}} */ … … 4597 4597 as they will occur if magick_wand contains no images 4598 4598 */ 4599 img_idx = (long) MagickGetI mageIndex( magick_wand );4599 img_idx = (long) MagickGetIteratorIndex( magick_wand ); 4600 4600 if ( MagickGetExceptionType(magick_wand) != UndefinedException ) { 4601 4601 RETURN_FALSE; … … 4723 4723 as they will occur if magick_wand contains no images 4724 4724 */ 4725 img_idx = (long) MagickGetI mageIndex( magick_wand );4725 img_idx = (long) MagickGetIteratorIndex( magick_wand ); 4726 4726 if ( MagickGetExceptionType(magick_wand) != UndefinedException ) { 4727 4727 RETURN_FALSE; … … 4851 4851 as they will occur if magick_wand contains no images 4852 4852 */ 4853 img_idx = (long) MagickGetI mageIndex( magick_wand );4853 img_idx = (long) MagickGetIteratorIndex( magick_wand ); 4854 4854 if ( MagickGetExceptionType(magick_wand) != UndefinedException ) { 4855 4855 RETURN_FALSE; … … 4951 4951 as they will occur if magick_wand contains no images 4952 4952 */ 4953 img_idx = (long) MagickGetI mageIndex( magick_wand );4953 img_idx = (long) MagickGetIteratorIndex( magick_wand ); 4954 4954 if ( MagickGetExceptionType(magick_wand) != UndefinedException ) { 4955 4955 RETURN_FALSE; … … 5425 5425 as they will occur if magick_wand contains no images 5426 5426 */ 5427 img_idx = (long) MagickGetI mageIndex( magick_wand );5427 img_idx = (long) MagickGetIteratorIndex( magick_wand ); 5428 5428 if ( MagickGetExceptionType(magick_wand) != UndefinedException ) { 5429 5429 RETURN_FALSE; … … 5508 5508 as they will occur if magick_wand contains no images 5509 5509 */ 5510 img_idx = (long) MagickGetI mageIndex( magick_wand );5510 img_idx = (long) MagickGetIteratorIndex( magick_wand ); 5511 5511 if ( MagickGetExceptionType(magick_wand) != UndefinedException ) { 5512 5512 RETURN_FALSE; … … 5754 5754 /* }}} */ 5755 5755 5756 /* {{{ proto string MagickGetImage Attribute( MagickWand magick_wand, string key )5756 /* {{{ proto string MagickGetImageProperty( MagickWand magick_wand, string key ) 5757 5757 */ 5758 5758 PHP_FUNCTION( magickgetimageattribute ) … … 5771 5771 MW_GET_POINTER_FROM_RSRC( MagickWand, magick_wand, &magick_wand_rsrc_zvl_p ); 5772 5772 5773 value = (char *) MagickGetImage Attribute( magick_wand, key );5773 value = (char *) MagickGetImageProperty( magick_wand, key ); 5774 5774 5775 5775 if ( value == (char *) NULL || *value == '\0' ) { … … 5910 5910 /* }}} */ 5911 5911 5912 /* {{{ proto int MagickGetI mageIndex( MagickWand magick_wand )5912 /* {{{ proto int MagickGetIteratorIndex( MagickWand magick_wand ) 5913 5913 */ 5914 5914 PHP_FUNCTION( magickgetimageindex ) … … 5916 5916 MW_PRINT_DEBUG_INFO 5917 5917 5918 MW_GET_WAND_RET_LONG( MagickWand, MagickGetI mageIndex );5918 MW_GET_WAND_RET_LONG( MagickWand, MagickGetIteratorIndex ); 5919 5919 } 5920 5920 /* }}} */ … … 6036 6036 /* }}} */ 6037 6037 6038 /* {{{ proto array Magick GetImagePixels( MagickWand magick_wand, int x_offset, int y_offset, float columns, float rows, string map, int storage_type )6038 /* {{{ proto array MagickExportImagePixels( MagickWand magick_wand, int x_offset, int y_offset, float columns, float rows, string map, int storage_type ) 6039 6039 */ 6040 6040 PHP_FUNCTION( magickgetimagepixels ) … … 6087 6087 { type *pixel_array; \ 6088 6088 MW_ARR_ECALLOC( type, pixel_array, pixel_array_length ); \ 6089 if ( Magick GetImagePixels( magick_wand, \6089 if ( MagickExportImagePixels( magick_wand, \ 6090 6090 x_offset, y_offset, \ 6091 6091 (unsigned long) columns, (unsigned long) rows, \ … … 6258 6258 /* }}} */ 6259 6259 6260 /* {{{ proto int MagickGetImage Size( MagickWand magick_wand )6260 /* {{{ proto int MagickGetImageLength( MagickWand magick_wand ) 6261 6261 */ 6262 6262 PHP_FUNCTION( magickgetimagesize ) … … 7047 7047 } 7048 7048 7049 cur_idx = (long) MagickGetI mageIndex( magick_wand );7049 cur_idx = (long) MagickGetIteratorIndex( magick_wand ); 7050 7050 if ( MagickGetExceptionType(magick_wand) != UndefinedException ) { 7051 7051 cur_idx = -1; … … 7054 7054 7055 7055 if ( MagickNewImage( magick_wand, (unsigned long) width, (unsigned long) height, bg_pixel_wand ) == MagickTrue 7056 && MagickSetI mageIndex( magick_wand, (cur_idx + 1) ) == MagickTrue )7056 && MagickSetIteratorIndex( magick_wand, (cur_idx + 1) ) == MagickTrue ) 7057 7057 { 7058 7058 RETVAL_TRUE; … … 7783 7783 if( MagickReadImageBlob( magick_wand, (void *) blob, (size_t) blob_len ) == MagickTrue ) { 7784 7784 7785 if ( MagickSetI mageIndex( magick_wand, (long) orig_img_idx ) == MagickTrue ) {7785 if ( MagickSetIteratorIndex( magick_wand, (long) orig_img_idx ) == MagickTrue ) { 7786 7786 while ( MagickSetImageFilename( magick_wand, (char *) NULL ), MagickNextImage( magick_wand ) == MagickTrue ) 7787 7787 ; … … 7824 7824 unsigned long orig_img_idx = (unsigned long) MagickGetNumberImages( magick_wand ); 7825 7825 7826 if ( MagickSetI mageIndex( magick_wand, (long) orig_img_idx ) == MagickTrue ) {7826 if ( MagickSetIteratorIndex( magick_wand, (long) orig_img_idx ) == MagickTrue ) { 7827 7827 while ( MagickSetImageFilename( magick_wand, (char *) NULL ), MagickNextImage( magick_wand ) == MagickTrue ) 7828 7828 ; … … 8340 8340 /* }}} */ 8341 8341 8342 /* {{{ proto bool MagickSetImage Attribute( MagickWand magick_wand, string key, string value )8342 /* {{{ proto bool MagickSetImageProperty( MagickWand magick_wand, string key, string value ) 8343 8343 */ 8344 8344 PHP_FUNCTION( magicksetimageattribute ) … … 8364 8364 MW_GET_POINTER_FROM_RSRC( MagickWand, magick_wand, &magick_wand_rsrc_zvl_p ); 8365 8365 8366 MW_BOOL_FUNC_RETVAL_BOOL( MagickSetImage Attribute( magick_wand, key, value ) );8366 MW_BOOL_FUNC_RETVAL_BOOL( MagickSetImageProperty( magick_wand, key, value ) ); 8367 8367 } 8368 8368 /* }}} */ … … 8703 8703 /* }}} */ 8704 8704 8705 /* {{{ proto bool MagickSetI mageIndex( MagickWand magick_wand, int index )8705 /* {{{ proto bool MagickSetIteratorIndex( MagickWand magick_wand, int index ) 8706 8706 */ 8707 8707 PHP_FUNCTION( magicksetimageindex ) … … 8717 8717 MW_GET_POINTER_FROM_RSRC( MagickWand, magick_wand, &magick_wand_rsrc_zvl_p ); 8718 8718 8719 MW_BOOL_FUNC_RETVAL_BOOL( MagickSetI mageIndex( magick_wand, index ) );8719 MW_BOOL_FUNC_RETVAL_BOOL( MagickSetIteratorIndex( magick_wand, index ) ); 8720 8720 } 8721 8721 /* }}} */ … … 8829 8829 /* }}} */ 8830 8830 8831 /* {{{ proto bool Magick SetImagePixels( MagickWand magick_wand, int x_offset, int y_offset, float columns, float rows, string map, int storage_type, array pixel_array )8831 /* {{{ proto bool MagickImportImagePixels( MagickWand magick_wand, int x_offset, int y_offset, float columns, float rows, string map, int storage_type, array pixel_array ) 8832 8832 */ 8833 8833 PHP_FUNCTION( magicksetimagepixels ) … … 8903 8903 } \ 8904 8904 MW_BOOL_FUNC_RETVAL_BOOL( \ 8905 Magick SetImagePixels( magick_wand, \8905 MagickImportImagePixels( magick_wand, \ 8906 8906 x_offset, y_offset, \ 8907 8907 (unsigned long) columns, (unsigned long) rows, \ … … 9826 9826 as they will occur if magick_wand contains no images 9827 9827 */ 9828 img_idx = (long) MagickGetI mageIndex( magick_wand );9828 img_idx = (long) MagickGetIteratorIndex( magick_wand ); 9829 9829 if ( MagickGetExceptionType(magick_wand) != UndefinedException ) { 9830 9830 RETURN_FALSE; … … 9978 9978 which will occur if magick_wand contains no images 9979 9979 */ 9980 initial_index = (long) MagickGetI mageIndex( magick_wand );9980 initial_index = (long) MagickGetIteratorIndex( magick_wand ); 9981 9981 9982 9982 if ( MagickGetExceptionType(magick_wand) != UndefinedException ) { … … 10232 10232 10233 10233 /* If all the above was successful, set the image index back to what it was */ 10234 if ( MagickSetI mageIndex( magick_wand, initial_index ) == MagickFalse ) {10235 10236 /* Just in case error occurs in MagickSetI mageIndex() */10234 if ( MagickSetIteratorIndex( magick_wand, initial_index ) == MagickFalse ) { 10235 10236 /* Just in case error occurs in MagickSetIteratorIndex() */ 10237 10237 MW_API_FUNC_FAIL_CHECK_WAND_ERROR_EX_1( magick_wand, MagickWand, 10238 10238 "cannot reset the MagickWand index to %ld",
