Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-28 08:10:04

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Manipulating images with php

As promised i’m working on a new version of bas_img_selector. Right at the moment i’m figuring how to use forms to display images and how to add something like working like $thisarticle form images:

Article image field contains coma seperated image-id’s an for each image a image form is parsed once:

image form:
<div style='float:right;padding:10px 0 10px 10px;width:150px;min-height:100px;'>
<txp:bas_img width='150' height='100'/><br/>
<txp:bas_img_caption/><a href="<txp:bas_img link='1'/>">Enlarge</a>
</div>

There should be an base image and by width='150' a new thumbnail will be created on the fly. (For sure there will be a caching mechanism.)
Just change width='100' and the a smaller image will be displayed…

I’m actual using phpthumb, but my experiences doing serverside image manipulating images are very limted…

For my phpthumb works out of the box and it has a large amount of features.

My questions of the day:

  • Has anyone experiences with phpthumb?
  • Does anyone know a better one then phpthumb?
  • Are GD library or ImageMagick widely supported on servers out there?

Offline

#2 2007-03-28 11:11:01

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Manipulating images with php

Bastian,
I like the way you’re thinking. Wish I had some experience to add to the mix. :) Matthew


Offline

#3 2007-03-28 14:23:50

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Manipulating images with php

Bastian,

I added forms to the latest version of hak_article_image and it works in a similar fashion by creating a $hak_thisimage global variable. Let me know if I can help in anyway or if you want a copy of the code.

Have you looked at the built in wet_thumb class? It’d be something less to distribute. I think GD is fairly common but it’s not always there. I’ve run into 2 hosts that didn’t have it.


Shoving is the answer – pusher robot

Offline

#4 2007-03-28 15:09:14

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: Manipulating images with php

hakjoon,

send you a mail via forum mailer

Didn’t know that you did the form thing already. I will have a look!

Offline

#5 2007-03-28 15:31:51

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Manipulating images with php

The Bas is back!

Wilkommen… Looking forward to the next Bas_img_selector, I think i’m it’s biggest fan.

Offline

#6 2007-03-28 16:11:24

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: Manipulating images with php

Thx

Offline

#7 2007-03-29 05:53:01

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Manipulating images with php

Bastian wrote:

  • Does anyone know a better one then phpthumb?

No clues about better or worse, but there’s one which it does this job in core code already.

Offline

#8 2007-03-29 10:52:33

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: Manipulating images with php

The class.thumb.php seems to be interesting… The “add magnifying glass” thing is a good idea

But i want some more features then the class.thumb.php contains:

  • Rotate
  • Overlay mask image (drop shadow)
  • Some basic filters (Gamma corrected, Contrast etc.)

In the image form i want to use only some basics (resize, crop), but the img selector will contain the additional things:

Since a year a try to manage a blog for multiple users and i talk and talk and talk, perhaps i am a bad teacher, but these guys don’t (want to) learn how to use even Irfan View.
They can connect their cameras to their computers, but they are not willing to scale or rotate their images.

I have the strong hope, that they are able to click Rotate or A little more contrasts while the are include an image to their articles with the img_selector.

Last edited by Bastian (2007-03-29 10:52:47)

Offline

#9 2007-03-29 13:41:58

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Manipulating images with php

Bastian wrote:

They can connect their cameras to their computers, but they are not willing to scale or rotate their images. I have the strong hope, that they are able to click Rotate or A little more contrasts while the are include an image to their articles with the img_selector.

You’re right, for many people editing an image is a non starter. Looking forward to whatever you can come up with.

Offline

Board footer

Powered by FluxBB