ImageResize

by adamh

Show:

sufiansays

nice work

Posted 11 months ago

adamhsays

Author

Glad you like it. Any suggestions, let me know

Posted 11 months ago

salamfallsays

How can I integrate this in a php MVC artchitecture /news/article/article_name

Posted 11 months ago
Author

Default-user adamhreplied

If you put the script in the root of your app (as per the instructions doc), you can resize any image within the root by adding query string parameters

eg path/to/image.jpg?width=100

If you want to have fully friendly urls for the resized images too, you could add a mod_rewrite rule so that you could refer to the image above as:

path/to/image.jpg/width/600/height/400

Does that answer your question?

Posted 11 months ago

dirty_densays

Purchased

Doesnt seem to work for me :( uploaded to windows server in a subfolder and get error ‘image cannot be found’ so I think ther may be a path script error for this server set up.

Also tried uploading on the same server to a site root as you suggest and still the same error using your sample files.

Can you suggest a code fix assume the error is caused around the define path lines in the php class?

We shouldnt need apache mod rewrite or the ht access for this to work, only for rewritten sef urls. Its doesnt say it is only for linux.

I prefered this script than the other similar one on here because of the cropping functionality.

Thanks

Posted 11 months ago
Author

Default-user adamhreplied

The script requires mod_rewrite only for friendly urls – mod_rewrite can be installed on windows/iis using a plugin such as Isapi Rewrite (www.isapirewrite.com).

The script can still be used without mod_rewrite, using query strings. Just put your source image in the source query string:

/path/to/resize.php?source=/path/to/image.jpg&width=100

I hope that helps – let me know either way.

Posted 11 months ago

dirty_densays

Purchased

Yes I have this ISAPI rewrite filter already installed but dont require the urls changing. I already did exactly as you said. the image is visible and pointing to the correct path previously. But when I add the suffix eg

&width=100 I get the error. Ill try it on another server tomorrow, Maybe it is a server path issue.

Posted 11 months ago
Author

Default-user adamhreplied

I didn’t hear back from you – assuming the script is working ok? Let me know if not

Posted 10 months ago

adamhsays

Author

The problem is that the path to your image is wrong. Can you send me the link you’re using to resize as well as a link to the original image so I can try to debug?

Posted 11 months ago

argosmediasays

What is the practical use of this script? It does not really resize pictures, it just visually resizes them. So big pics stay big, but they only appear smaller. This is effectively the same as good old height=”x” and width=”x” HTML parameters. I don’t understand the advantage of this script. Do I miss something?

Posted 11 months ago
Author

Default-user adamhreplied

It resizes images on the fly, so the image served to the browser is a smaller file size. If you use html width and height attributes, the full-sized file is served, resizing is done by the browser (badly and out of proportion) and your code won’t be valid xhtml.

The script can easily be updated to permanently save the resized images.

The script can also crop and stretch images as required.

Posted 11 months ago

argosmediasays

Oh I’m sorry, you’re right. I think I didn’t check well the first time…

Posted 11 months ago

dgoujardsays

Script need GD and ImageMagic for transparency ?

Posted 11 months ago
Author

Default-user adamhreplied

Just GD

Posted 11 months ago

dgoujardsays

Purchased

Ok, i have buy this script but i need add in get quality=5 without quality i have error. And png without transparency !!! i have test with http://www.noelshack.com/up/aac/kevgil-angel-or-devil-tux-a77bc95f70.png and when i resize i have an black background… http://www.noelshack.com/up/aac/kevgil-angel-or-devil-tux_o-2a931f7f14.png

i have buy this script for transparency….

Posted 11 months ago
Author

Default-user adamhreplied

I’ve added a new version of the script which fixes the png transparency issues – it’ll be up as soon as ThemeForest approve it.

It also fixes any quality issue. Sorry for the inconvenience.

Posted 11 months ago
Purchased

Default-user dgoujardreplied

Thank you very mutch :)

Posted 11 months ago
1 More Reply
Purchased

Default-user dgoujardreplied

And work :) thank you very mutch

Posted 11 months ago

adamhsays

Author

You can change the quality by adding quality=50 (or whatever). Default quality is 80.

I’ll have a look at the transparency issues and get back to you asap.

Posted 11 months ago

adamhsays

Author

Glad to see people using the script – does anyone have any feature requests? Thinking about what to add to the next version.

Posted 10 months ago

ryan44says

Purchased

I’m having a problem, the script resizes and crops great, but sometimes the images don’t load properly. i.e. if you refresh the page, some will display, refresh again, and none show.

Any ideas what’s causing this?

Posted 6 months ago
Author

Default-user adamhreplied

Hi Ryan

As ImageResize is server-side, the only thing I can think is that you (or your server) may be adding to or modifying the cache headers on the outputted image. Can you check to see if the problem affects the following image:

http://adamhopkinson.co.uk/classes/resize/images/spitfire.jpg?height=200

If not, please report back what browser you are using as well as what PHP version and GD version. You can get this by calling phpinfo().

Thanks, Adam

Posted 6 months ago

johanhendrixsays

I would like to see an extra feature added which allows to set the crop to:

topleft, topcenter, topright, middleleft, middlecenter, middleright, bottomleft, bottomcenter, bottomright.

This wil come in very handy when using it for a gallery with headshots. Headshots often require a topcenter crop because otherwise the head will be cut off.

Cheers!

Posted 5 months ago

jomarksays

I am interested. But I’d like to know if can use it in lieu of timthumb and what are its advantages. My wordpress site is using timthumb but sometimes it does not load the image properly.

Posted 4 months ago
Author

Default-user adamhreplied

Having had a brief look at timthumb, I think ImageResize offers the same functionality set.

However, the fact that your images are not always loading may indicate a problem with your server (such as low resources). If this is the case, you might have the same issues with any image resize script.

Posted 4 months ago

xemmexsays

I see that is it PHP 4x compatible, but does it work with PHP5 ?

Posted 4 months ago
Author

Default-user adamhreplied

It does work in PHP5 – I believe the php compatibility on CodeCanyon is “the stated version and up”

Posted 4 months ago

$8

Prepaid customers
pay just $6 - how? Prepay Your Account With our deposit system not only will purchasing be much faster, but we’ll also take $2 off the price! Find Out More Price

You must sign in or sign up to purchase this item.

12345 ( 11 ratings )

Purchase 54 purchases

File Types Included
PHP
Item Attributes
Created 19 September 09
PHP Version 4.x
MySQL Version N/A
Compatible Browsers FireFox 2, FireFox 3, IE6, IE7, IE8, Safari
ThemeForest Files Included N/A
PHP Files Included PHP
PHP Framework N/A