Yii Framework Forum: Auto Size For Height Or Width In Image Extension - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Auto Size For Height Or Width In Image Extension Rate Topic: -----

#1 User is offline   msoa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 261
  • Joined: 15-August 12

Posted 18 May 2014 - 07:57 AM

Hi there,
I have a picture in 1024x768 size. i want resize width to 250 and the height automatically be set to a suitable size. how can do it?

$image = Yii::app()->image->load('images/test.jpg');
$image->resize(250, i want height automatically be set to a suitable size);
$image->save();

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users