"fill" avatar image

10 years 5 months ago #236162 by danbo1972
Replied by danbo1972 on topic "fill" avatar image
The problem with demanding a 250x250 without maintaining aspect ratio is that you will end up cutting off your users head or sides, etc. without manually editing the image you will have no control over what is lost in the image.
if you stretch the image you will get odd distortion.
I don't see how you can effectively change the size of a picture without re-sampling the image and maintaining the original ratios.
Sorry if Im not giving you what you were looking for.

Please Log in to join the conversation.

10 years 5 months ago - 10 years 5 months ago #236163 by thewebsurfer
Replied by thewebsurfer on topic "fill" avatar image
the user list looks kind of bad-looking and messy with the all different avatar image sizes
this is my result with css (that i prefer not use, i would prefer direct image processing with imagemagik)
File Attachment:



this is my hack of cb.core.php (row 2822)
$return							=	$aTag
										//	'<img src="' . $imgUrl . '" alt="' . htmlspecialchars( $name ) . '" title="' . htmlspecialchars( $name ) . '" class="' . $class . '" />'
										
.								(( $reason == 'profile')? 
'<span  class="' . $class . '"><a class="jcepopup" href="'. $imgUrl .'" style="display:block;width:'.$this->_getImageFieldParam( $field, 'thumbWidth').'px;height:'.$this->_getImageFieldParam( $field, 'thumbWidth').'px;background:url('. $imgUrl .') no-repeat center;background-size: cover;"></a></span>'
			:
			'<span style="display:block;width:'.$this->_getImageFieldParam( $field, 'thumbWidth').'px;height:'.$this->_getImageFieldParam( $field, 'thumbWidth').'px;background:url('. $imgUrl .') no-repeat center;background-size: cover;." class="' . $class . '"></span>')
			
			
													
										.	$naTag;
		return $return;

this is the user list without hack but modded to avoid all tables(obiouvlsy in different joomla installation)
File Attachment:


as you can see, all that i don't want is those different size, i want a squared size avatar for all (facebook do that)
i dont care of cutting the faces, the users will care about that.

anyway thanks for the attention man :)

Please Log in to join the conversation.

10 years 5 months ago #236165 by danbo1972
Replied by danbo1972 on topic "fill" avatar image
I wondered if that's what you were shooting for after I sent my last message. Sorry I wasn't grasping that initially. What would be nice is a plugin that allows you to set the sizes in the back-end, and allow the user to select where on a photo they want to crop prior to the upload. You are correct in your assumption that this is going to be a css issue unless you get another plugin. Something like this may help you.
demo.joomlaxtc.com/extensions/index.php?option=com_content&view=article&id=244&Itemid=280

Please Log in to join the conversation.

10 years 5 months ago #236166 by thewebsurfer
Replied by thewebsurfer on topic "fill" avatar image

danbo1972 wrote: I wondered if that's what you were shooting for after I sent my last message. Sorry I wasn't grasping that initially. What would be nice is a plugin that allows you to set the sizes in the back-end, and allow the user to select where on a photo they want to crop prior to the upload. You are correct in your assumption that this is going to be a css issue unless you get another plugin. Something like this may help you.
demo.joomlaxtc.com/extensions/index.php?option=com_content&view=article&id=244&Itemid=280


i will stay with the css solution, thanks a lot anyway and thanks for the link, i will consider that.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.178 seconds

Facebook Twitter LinkedIn