[buddypress-trac] [BuddyPress] #1294: Group Avatar Crop Tool failure

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu Oct 7 23:24:35 UTC 2010


#1294: Group Avatar Crop Tool failure
--------------------------------------------------------------+-------------
 Reporter:  gazouteast                                        |        Owner:  jason_jm
     Type:  defect                                            |       Status:  reopened
 Priority:  major                                             |    Milestone:  1.2.6   
Component:  Groups                                            |   Resolution:          
 Keywords:  Group creation, Group edit, avatars, needs-patch  |  
--------------------------------------------------------------+-------------

Comment(by nuprn1):

 fwiw - snippet of code


 {{{

 list($width, $height, $orig_type) =  getimagesize( $src_file );



         // convert from full colors to index colors, like original PNG.
         if ( IMAGETYPE_PNG == $orig_type && !imageistruecolor( $dst ) )
                 imagetruecolortopalette( $dst, false, imagecolorstotal(
 $dst ) );

         if ( IMAGETYPE_GIF == $orig_type ) {
                 if ( !imagegif( $dst, $destfilename ) )
                         return new WP_Error('resize_path_invalid', __(
 'Resize path invalid' ));
         } elseif ( IMAGETYPE_PNG == $orig_type ) {
                 if ( !imagepng( $dst, $destfilename ) )
                         return new WP_Error('resize_path_invalid', __(
 'Resize path invalid' ));
         } else {
                 if ( !imagejpeg( $dst, $destfilename, apply_filters(
 'jpeg_quality', 90, 'wp_crop_image' ) ) )
                         return new WP_Error('resize_path_invalid', __(
 'Resize path invalid' ));
         }
 }}}

-- 
Ticket URL: <http://trac.buddypress.org/ticket/1294#comment:15>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list