Changeset 424 for MagickWandForPHP

Show
Ignore:
Timestamp:
10/21/09 07:46:08 (5 months ago)
Author:
cristy
Message:
 
Location:
MagickWandForPHP/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • MagickWandForPHP/trunk/ChangeLog

    r1 r424  
    3030 
    31312007-02-12  1.0.0-0 Cristy  <omicronpersei8@image...> 
    32   * Deprecate MagickGetImageAttribute()/MagickSetImageAttribute(), use 
     32  * Deprecate MagickGetImageProperty()/MagickSetImageAttribute(), use 
    3333    MagickGetImageProperty()/MagickSetImageProperty() instead. 
    3434 
     
    10471047- MagickWand for PHP v0.1.4 has a minimum requirement of ImageMagick-6.2.1-1 
    10481048 
    1049 - Added the new MagickWand C API functions MagickGetImageAttribute(), 
     1049- Added the new MagickWand C API functions MagickGetImageProperty(), 
    10501050  MagickIdentifyImage() and MagickSepiaToneImage(). 
    10511051 
  • MagickWandForPHP/trunk/magickwand.c

    r1 r424  
    148148                          php_stream_close(stream); 
    149149 
    150                           if ( MagickSetImageIndex( magick_wand, (long) orig_img_idx ) == MagickTrue ) { 
     150                          if ( MagickSetIteratorIndex( magick_wand, (long) orig_img_idx ) == MagickTrue ) { 
    151151                                  while ( MagickSetImageFilename( magick_wand, (char *) NULL ), MagickNextImage( magick_wand ) == MagickTrue ) 
    152152                                          ; 
     
    234234                } 
    235235 
    236                 img_idx = (long) MagickGetImageIndex( magick_wand ); 
     236                img_idx = (long) MagickGetIteratorIndex( magick_wand ); 
    237237                if ( MagickGetExceptionType(magick_wand) == UndefinedException ) { 
    238238                        img_idx++; 
     
    242242                if ( MagickReadImage( magick_wand, real_magick_format ) == MagickTrue ) { 
    243243 
    244                         if ( MagickSetImageIndex( magick_wand, (long) img_idx ) == MagickTrue ) { 
     244                        if ( MagickSetIteratorIndex( magick_wand, (long) img_idx ) == MagickTrue ) { 
    245245 
    246246                                num_imgs = ((unsigned long) MagickGetNumberImages( magick_wand )) - num_imgs - 1; 
     
    287287                                } 
    288288                                else { 
    289                                         img_idx = (long) MagickGetImageIndex( magick_wand ); 
     289                                        img_idx = (long) MagickGetIteratorIndex( magick_wand ); 
    290290                                } 
    291291 
     
    298298                                        MW_DEBUG_NOTICE_EX( "The image \"%s\" was read successfully", real_filename ); 
    299299 
    300                                         if ( MagickSetImageIndex( magick_wand, (long) img_idx ) == MagickTrue ) { 
     300                                        if ( MagickSetIteratorIndex( magick_wand, (long) img_idx ) == MagickTrue ) { 
    301301 
    302302                                                if ( set_wand_format == MagickTrue ) { 
     
    21752175/* }}} */ 
    21762176 
    2177 /* {{{ proto float DrawGetFillAlpha( DrawingWand draw_wand ) 
     2177/* {{{ proto float DrawGetFillOpacity( DrawingWand draw_wand ) 
    21782178*/ 
    21792179PHP_FUNCTION( drawgetfillalpha ) 
     
    21812181        MW_PRINT_DEBUG_INFO 
    21822182 
    2183         MW_GET_WAND_RET_DOUBLE( DrawingWand, DrawGetFillAlpha ); 
     2183        MW_GET_WAND_RET_DOUBLE( DrawingWand, DrawGetFillOpacity ); 
    21842184} 
    21852185/* }}} */ 
     
    22852285/* }}} */ 
    22862286 
    2287 /* {{{ proto float DrawGetStrokeAlpha( DrawingWand draw_wand ) 
     2287/* {{{ proto float DrawGetStrokeOpacity( DrawingWand draw_wand ) 
    22882288*/ 
    22892289PHP_FUNCTION( drawgetstrokealpha ) 
     
    22912291        MW_PRINT_DEBUG_INFO 
    22922292 
    2293         MW_GET_WAND_RET_DOUBLE( DrawingWand, DrawGetStrokeAlpha ); 
     2293        MW_GET_WAND_RET_DOUBLE( DrawingWand, DrawGetStrokeOpacity ); 
    22942294} 
    22952295/* }}} */ 
     
    30933093/* }}} */ 
    30943094 
    3095 /* {{{ proto void DrawSetFillAlpha( DrawingWand draw_wand, float fill_opacity ) 
     3095/* {{{ proto void DrawSetFillOpacity( DrawingWand draw_wand, float fill_opacity ) 
    30963096*/ 
    30973097PHP_FUNCTION( drawsetfillalpha ) 
     
    30993099        MW_PRINT_DEBUG_INFO 
    31003100 
    3101         MW_GET_WAND_SET_NORMALIZED_COLOR( DrawingWand, DrawSetFillAlpha ); 
     3101        MW_GET_WAND_SET_NORMALIZED_COLOR( DrawingWand, DrawSetFillOpacity ); 
    31023102} 
    31033103/* }}} */ 
     
    32623262/* }}} */ 
    32633263 
    3264 /* {{{ proto void DrawSetStrokeAlpha( DrawingWand draw_wand, float stroke_opacity ) 
     3264/* {{{ proto void DrawSetStrokeOpacity( DrawingWand draw_wand, float stroke_opacity ) 
    32653265*/ 
    32663266PHP_FUNCTION( drawsetstrokealpha ) 
     
    32683268        MW_PRINT_DEBUG_INFO 
    32693269 
    3270         MW_GET_WAND_SET_NORMALIZED_COLOR( DrawingWand, DrawSetStrokeAlpha ); 
     3270        MW_GET_WAND_SET_NORMALIZED_COLOR( DrawingWand, DrawSetStrokeOpacity ); 
    32713271} 
    32723272/* }}} */ 
     
    40114011/* }}} */ 
    40124012 
    4013 /* {{{ proto bool MagickClipPathImage( MagickWand magick_wand, string pathname, bool inside ) 
     4013/* {{{ proto bool MagickClipImagePath( MagickWand magick_wand, string pathname, bool inside ) 
    40144014*/ 
    40154015PHP_FUNCTION( magickclippathimage ) 
     
    40294029        MW_GET_POINTER_FROM_RSRC( MagickWand, magick_wand, &magick_wand_rsrc_zvl_p ); 
    40304030 
    4031         MW_BOOL_FUNC_RETVAL_BOOL( MagickClipPathImage( 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) ) ); 
    40324032} 
    40334033/* }}} */ 
     
    45454545/* }}} */ 
    45464546 
    4547 /* {{{ proto string MagickDescribeImage( MagickWand magick_wand ) 
     4547/* {{{ proto string MagickIdentifyImage( MagickWand magick_wand ) 
    45484548*/ 
    45494549PHP_FUNCTION( magickdescribeimage ) 
     
    45514551        MW_PRINT_DEBUG_INFO 
    45524552 
    4553         MW_GET_WAND_RETVAL_STRING( MagickWand, MagickDescribeImage ); 
     4553        MW_GET_WAND_RETVAL_STRING( MagickWand, MagickIdentifyImage ); 
    45544554} 
    45554555/* }}} */ 
     
    45974597           as they will occur if magick_wand contains no images 
    45984598        */ 
    4599         img_idx = (long) MagickGetImageIndex( magick_wand ); 
     4599        img_idx = (long) MagickGetIteratorIndex( magick_wand ); 
    46004600        if ( MagickGetExceptionType(magick_wand) != UndefinedException  ) { 
    46014601                RETURN_FALSE; 
     
    47234723           as they will occur if magick_wand contains no images 
    47244724        */ 
    4725         img_idx = (long) MagickGetImageIndex( magick_wand ); 
     4725        img_idx = (long) MagickGetIteratorIndex( magick_wand ); 
    47264726        if ( MagickGetExceptionType(magick_wand) != UndefinedException  ) { 
    47274727                RETURN_FALSE; 
     
    48514851           as they will occur if magick_wand contains no images 
    48524852        */ 
    4853         img_idx = (long) MagickGetImageIndex( magick_wand ); 
     4853        img_idx = (long) MagickGetIteratorIndex( magick_wand ); 
    48544854        if ( MagickGetExceptionType(magick_wand) != UndefinedException  ) { 
    48554855                RETURN_FALSE; 
     
    49514951           as they will occur if magick_wand contains no images 
    49524952        */ 
    4953         img_idx = (long) MagickGetImageIndex( magick_wand ); 
     4953        img_idx = (long) MagickGetIteratorIndex( magick_wand ); 
    49544954        if ( MagickGetExceptionType(magick_wand) != UndefinedException  ) { 
    49554955                RETURN_FALSE; 
     
    54255425           as they will occur if magick_wand contains no images 
    54265426        */ 
    5427         img_idx = (long) MagickGetImageIndex( magick_wand ); 
     5427        img_idx = (long) MagickGetIteratorIndex( magick_wand ); 
    54285428        if ( MagickGetExceptionType(magick_wand) != UndefinedException  ) { 
    54295429                RETURN_FALSE; 
     
    55085508           as they will occur if magick_wand contains no images 
    55095509        */ 
    5510         img_idx = (long) MagickGetImageIndex( magick_wand ); 
     5510        img_idx = (long) MagickGetIteratorIndex( magick_wand ); 
    55115511        if ( MagickGetExceptionType(magick_wand) != UndefinedException  ) { 
    55125512                RETURN_FALSE; 
     
    57545754/* }}} */ 
    57555755 
    5756 /* {{{ proto string MagickGetImageAttribute( MagickWand magick_wand, string key ) 
     5756/* {{{ proto string MagickGetImageProperty( MagickWand magick_wand, string key ) 
    57575757*/ 
    57585758PHP_FUNCTION( magickgetimageattribute ) 
     
    57715771        MW_GET_POINTER_FROM_RSRC( MagickWand, magick_wand, &magick_wand_rsrc_zvl_p ); 
    57725772 
    5773         value = (char *) MagickGetImageAttribute( magick_wand, key ); 
     5773        value = (char *) MagickGetImageProperty( magick_wand, key ); 
    57745774 
    57755775        if ( value == (char *) NULL || *value == '\0' ) { 
     
    59105910/* }}} */ 
    59115911 
    5912 /* {{{ proto int MagickGetImageIndex( MagickWand magick_wand ) 
     5912/* {{{ proto int MagickGetIteratorIndex( MagickWand magick_wand ) 
    59135913*/ 
    59145914PHP_FUNCTION( magickgetimageindex ) 
     
    59165916        MW_PRINT_DEBUG_INFO 
    59175917 
    5918         MW_GET_WAND_RET_LONG( MagickWand, MagickGetImageIndex ); 
     5918        MW_GET_WAND_RET_LONG( MagickWand, MagickGetIteratorIndex ); 
    59195919} 
    59205920/* }}} */ 
     
    60366036/* }}} */ 
    60376037 
    6038 /* {{{ proto array MagickGetImagePixels( 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 ) 
    60396039*/ 
    60406040PHP_FUNCTION( magickgetimagepixels ) 
     
    60876087{   type *pixel_array;  \ 
    60886088        MW_ARR_ECALLOC( type, pixel_array, pixel_array_length );  \ 
    6089         if ( MagickGetImagePixels( magick_wand,  \ 
     6089        if ( MagickExportImagePixels( magick_wand,  \ 
    60906090                                                           x_offset, y_offset,  \ 
    60916091                                                           (unsigned long) columns, (unsigned long) rows,  \ 
     
    62586258/* }}} */ 
    62596259 
    6260 /* {{{ proto int MagickGetImageSize( MagickWand magick_wand ) 
     6260/* {{{ proto int MagickGetImageLength( MagickWand magick_wand ) 
    62616261*/ 
    62626262PHP_FUNCTION( magickgetimagesize ) 
     
    70477047        } 
    70487048 
    7049         cur_idx = (long) MagickGetImageIndex( magick_wand ); 
     7049        cur_idx = (long) MagickGetIteratorIndex( magick_wand ); 
    70507050        if ( MagickGetExceptionType(magick_wand) != UndefinedException ) { 
    70517051                cur_idx = -1; 
     
    70547054 
    70557055        if (   MagickNewImage( magick_wand, (unsigned long) width, (unsigned long) height, bg_pixel_wand ) == MagickTrue 
    7056                 && MagickSetImageIndex( magick_wand, (cur_idx + 1) ) == MagickTrue ) 
     7056                && MagickSetIteratorIndex( magick_wand, (cur_idx + 1) ) == MagickTrue ) 
    70577057        { 
    70587058                RETVAL_TRUE; 
     
    77837783        if( MagickReadImageBlob( magick_wand, (void *) blob, (size_t) blob_len ) == MagickTrue ) { 
    77847784 
    7785                 if ( MagickSetImageIndex( magick_wand, (long) orig_img_idx ) == MagickTrue ) { 
     7785                if ( MagickSetIteratorIndex( magick_wand, (long) orig_img_idx ) == MagickTrue ) { 
    77867786                        while ( MagickSetImageFilename( magick_wand, (char *) NULL ), MagickNextImage( magick_wand ) == MagickTrue ) 
    77877787                                ; 
     
    78247824                unsigned long orig_img_idx = (unsigned long) MagickGetNumberImages( magick_wand ); 
    78257825                 
    7826                 if ( MagickSetImageIndex( magick_wand, (long) orig_img_idx ) == MagickTrue ) { 
     7826                if ( MagickSetIteratorIndex( magick_wand, (long) orig_img_idx ) == MagickTrue ) { 
    78277827                        while ( MagickSetImageFilename( magick_wand, (char *) NULL ), MagickNextImage( magick_wand ) == MagickTrue ) 
    78287828                                ; 
     
    83408340/* }}} */ 
    83418341 
    8342 /* {{{ proto bool MagickSetImageAttribute( MagickWand magick_wand, string key, string value ) 
     8342/* {{{ proto bool MagickSetImageProperty( MagickWand magick_wand, string key, string value ) 
    83438343*/ 
    83448344PHP_FUNCTION( magicksetimageattribute ) 
     
    83648364        MW_GET_POINTER_FROM_RSRC( MagickWand, magick_wand, &magick_wand_rsrc_zvl_p ); 
    83658365 
    8366         MW_BOOL_FUNC_RETVAL_BOOL( MagickSetImageAttribute( magick_wand, key, value ) ); 
     8366        MW_BOOL_FUNC_RETVAL_BOOL( MagickSetImageProperty( magick_wand, key, value ) ); 
    83678367} 
    83688368/* }}} */ 
     
    87038703/* }}} */ 
    87048704 
    8705 /* {{{ proto bool MagickSetImageIndex( MagickWand magick_wand, int index ) 
     8705/* {{{ proto bool MagickSetIteratorIndex( MagickWand magick_wand, int index ) 
    87068706*/ 
    87078707PHP_FUNCTION( magicksetimageindex ) 
     
    87178717        MW_GET_POINTER_FROM_RSRC( MagickWand, magick_wand, &magick_wand_rsrc_zvl_p ); 
    87188718 
    8719         MW_BOOL_FUNC_RETVAL_BOOL( MagickSetImageIndex( magick_wand, index ) ); 
     8719        MW_BOOL_FUNC_RETVAL_BOOL( MagickSetIteratorIndex( magick_wand, index ) ); 
    87208720} 
    87218721/* }}} */ 
     
    88298829/* }}} */ 
    88308830 
    8831 /* {{{ proto bool MagickSetImagePixels( 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 ) 
    88328832*/ 
    88338833PHP_FUNCTION( magicksetimagepixels ) 
     
    89038903        }  \ 
    89048904        MW_BOOL_FUNC_RETVAL_BOOL(  \ 
    8905                 MagickSetImagePixels( magick_wand,  \ 
     8905                MagickImportImagePixels( magick_wand,  \ 
    89068906                                                          x_offset, y_offset,  \ 
    89078907                                                          (unsigned long) columns, (unsigned long) rows,  \ 
     
    98269826           as they will occur if magick_wand contains no images 
    98279827        */ 
    9828         img_idx = (long) MagickGetImageIndex( magick_wand ); 
     9828        img_idx = (long) MagickGetIteratorIndex( magick_wand ); 
    98299829        if ( MagickGetExceptionType(magick_wand) != UndefinedException  ) { 
    98309830                RETURN_FALSE; 
     
    99789978           which will occur if magick_wand contains no images 
    99799979        */ 
    9980         initial_index = (long) MagickGetImageIndex( magick_wand ); 
     9980        initial_index = (long) MagickGetIteratorIndex( magick_wand ); 
    99819981 
    99829982        if ( MagickGetExceptionType(magick_wand) != UndefinedException  ) { 
     
    1023210232 
    1023310233                /* If all the above was successful, set the image index back to what it was */ 
    10234                 if ( MagickSetImageIndex( magick_wand, initial_index ) == MagickFalse ) { 
    10235  
    10236                         /* Just in case error occurs in MagickSetImageIndex() */ 
     10234                if ( MagickSetIteratorIndex( magick_wand, initial_index ) == MagickFalse ) { 
     10235 
     10236                        /* Just in case error occurs in MagickSetIteratorIndex() */ 
    1023710237                        MW_API_FUNC_FAIL_CHECK_WAND_ERROR_EX_1( magick_wand, MagickWand, 
    1023810238                                                                                                        "cannot reset the MagickWand index to %ld",