Yii Framework Forum: [extension] Image - Yii Framework Forum

Jump to content

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

[extension] Image Rate Topic: -----

#1 User is offline   qwerty 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 290
  • Joined: 20-November 08

Posted 27 January 2009 - 05:31 AM

Hi,
is it possible to generate image on fly, without save on disk?

Thanx.
0

#2 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,013
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 27 January 2009 - 06:16 AM

See http://de2.php.net/m...n/ref.image.php and http://de2.php.net/m...xamples-png.php .
0

#3 User is offline   qwerty 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 290
  • Joined: 20-November 08

Posted 27 January 2009 - 11:09 AM

thanx,
maybe author image extension could add this feature?
0

#4 User is offline   miles 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 89
  • Joined: 16-January 09
  • Location:Beijing

Posted 31 January 2009 - 11:44 PM

sorry qwerty
Will not add this feature

this extension only Kohana Image Library wrapper
Kohana Image Library could not generate image on fly

我英文太烂了,希望能看明白~~~
0

#5 User is offline   MarcosX 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 21-July 09

Posted 12 August 2009 - 08:02 PM

changes in Image class to cut images into square from a rectangular image without distortion
Added new constant SQUARE
Modified 'resize' method to check the value of SQUARE and define if $master will determine WIDTH or HEIGHT

to cut images square
$thumb = Yii::app()->image->load('your_image.png');                                            
$thumb->resize(120, 120, Image::SQUARE)->crop(120,120)->sharpen(15)->quality(75);


Attached File  Image.php (10.4K)
Number of downloads: 104
0

#6 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 559
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 08 October 2009 - 09:23 PM

Hi,

works very nice! Thank you.

I just modified the files a little bit:

Yii::setPathOfAlias('image', dirname(__FILE__));
Yii::import('image.*');


instead of the full path, in Image and CImageComponent.
Because I use it as a extension in a module.


Best regards,
schmunk
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
1

#7 User is offline   seb 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 240
  • Joined: 29-June 09

Posted 06 January 2010 - 07:19 AM

There is a bug with transparent gif resizing - background becomes black.
Here is fixed Attached File  Image_GD_Driver.php (11.46K)
Number of downloads: 37.
0

#8 User is offline   Asgaroth 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 371
  • Joined: 17-July 09
  • Location:Bogota, Colombia

Posted 08 January 2010 - 03:45 PM

I have another problem which seems really bad.

Lets say I have an Image with 400k size, here is my code.

public function actionPrueba(){
		$imgh = Yii::app()->image;
		$img = $imgh->load("C:/test/images/30225.jpg");
		$img->render();
	}


then if I right click the image and save it locally, the new size its 712k.

I dont know why is i getting bigger, any help? Im really worried cause its affecting my site's preformance really bad.
- Extension: Dynamic DataProvider Behavior
- Extension: XUpload - jQuery File Upload Extension
- Extension: PhpQuickProfiler - A Web Log Router that will help you profile your application
- Extension: XDateView - A Date grouped Grid View
- Extension: Foundation - An easy to use, powerful, and flexible framework for building prototypes and production code on any kind of device.



- Wiki: How to generate Yii like Documentation
- Wiki: How to re enable logging during unit testing
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