[buddypress-trac] [BuddyPress] #1294: Group Avatar Crop Tool failure
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Sun Jan 17 01:22:02 UTC 2010
#1294: Group Avatar Crop Tool failure
------------------------------------------------+---------------------------
Reporter: gazouteast | Owner: jason_jm
Type: defect | Status: assigned
Priority: minor | Milestone: 1.2
Keywords: Group creation, Group edit, avatars |
------------------------------------------------+---------------------------
Comment(by nuprn1):
On a fresh trunk install with single WP
I noticed this problem where the step after image-upload (for croppping)
was not appearing. After some digging around I noticed on bp-core-
avatars.php
260 if ( getimagesize( $bp->avatar_admin->original['file'] ) >
BP_AVATAR_ORIGINAL_MAX_WIDTH ) {
261 $bp->avatar_admin->resized = wp_create_thumbnail(
$bp->avatar_admin->original['file'], BP_AVATAR_ORIGINAL_MAX_WIDTH );
262 }
the getimagesize was not returning a value, and the filepath was not full
$bp->avatar_admin->original['file'] = str_replace('wp-
content','',$bp->avatar_admin->original['file']);
$bp->avatar_admin->original['file'] = WP_CONTENT_DIR .
$bp->avatar_admin->original['file'];
// Resize the image down to something manageable and then delete the
original
list($width, $height) = getimagesize( $bp->avatar_admin->original['file']
);
if ( $width > BP_AVATAR_ORIGINAL_MAX_WIDTH ) {
$bp->avatar_admin->resized = wp_create_thumbnail(
$bp->avatar_admin->original['file'], BP_AVATAR_ORIGINAL_MAX_WIDTH );
}
I'm able to crop but gif/png transparency is being converted to black
background
--
Ticket URL: <http://trac.buddypress.org/ticket/1294#comment:6>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list