Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2009-04-01 08:17:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: [plugin] [ORPHAN] ebl_image_edit v1.0

kostas45 wrote:

Maybe this can be used for a watermark feature?

OT: Eeek, you’ve just reminded me of a project I’d long forgotten about: an automatic watermarking plugin that I promised to write ages ago. I’ve written most of the code, I just need to port it to a plugin and make the interface for it. Thanks for (inadvertently) reminding me!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#62 2009-04-01 20:32:02

TheEric
Plugin Author
From: Wyoming
Registered: 2004-09-17
Posts: 566

Re: [plugin] [ORPHAN] ebl_image_edit v1.0

I’ll be releasing this today. Everything is built, the installer has been completed and it should be ready.

Offline

#63 2009-04-01 21:21:48

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: [plugin] [ORPHAN] ebl_image_edit v1.0

Hey Eric,

thank you so much, the size presets alone are an excellent addition!
I’m upping my contribution as I type.

Cheers Martin

Offline

#64 2009-04-02 00:36:17

TheEric
Plugin Author
From: Wyoming
Registered: 2004-09-17
Posts: 566

Re: [plugin] [ORPHAN] ebl_image_edit v1.0

I’m finishing the documentation now. While doing this, I realized that there is something else that needs to be added. The ability to restrict the users ability to resize the crop-box. The predefine sizes are set, but the user does have the ability to change that size. When I release the next version, I’ll add the ability to restrict the user from resizing the text-box from the defined-size tab.

Last edited by TheEric (2009-04-02 00:44:45)

Offline

#65 2009-04-02 01:19:19

TheEric
Plugin Author
From: Wyoming
Registered: 2004-09-17
Posts: 566

Re: [plugin] [ORPHAN] ebl_image_edit v1.0

EBL Image Edit v2.0

Advanced Image Editing Plugin for Textpattern

This plugin introduces advanced image editing functionality to Textpattern 4.07 / 4.08. Users may now custom crop, resize, rotate, and create custom thumbnails directly within Textpattern.

Features

This plugin allows for functions previously only available in image-editing programins. It allows for users, at any terminal which they’re logged in to to do the following:

  • Cropping: The original uploaded image can be edited to cut out parts that are not desired and keep only those important facets of the original image.
  • Thumbnail Crop: Make a thumbnail show not the entire image, but just enough to pique interest.
  • Rotate: For those pictures that are sideways or upside down. Users may rotate the image clockwise90°, counterclockwise90° or rotate a full 18090°.
  • Resize: Many digital images are just too large to be shown on the web. This option allows for excessively sized images to be scaled down. Built into the resizing function is the ability to maintain the original height to width ratio, so images will never seem squished one way or the other.
  • Image Backups: New for 2.0 is the feature to save an original copy of the the image to a temp folder so that you may restore it at any time. The image must first be saved by clicking on backup, and then may be restored at any time.

Installation

Installation is straight forward and involves the installation of one plugin file, and the upload of one directory to your Textpattern folder.

Contained within the zip archive are two files:

  1. ebl-image-edit_v1.0.txt : This is the plugin code that is pasted into the textbox in Admin -> Plugins
  2. jcrop : This folder will need to be uploaded to the Textpattern directory (e.g., /textpattern/ )

Once the above has been completed, activate the plugin in Admin -> Plugins

Once the plugin has been activated, navigate to Content -> Extensions -> EBL Image Edit. The temp folder and db field will be created. The plugin will be ready for use at this point.

Usage Instructions

  • Crop: This tab permits the cropping of images. Click and drag across the image to select the crop area. While selecting the crop region, the size of the crop area willbe displayed in as Width X Height. This is measured in pixels. You’ll note that the area outside of the crop region is dark, whereas the area inside is lighter. This is the intended effect. Everything within the crop area will be selected and will replace the original image once the Crop Original button is clicked.
    • Predefined size: This drop-down box allows the user to select pre-defined crop area selections. They may be moved around anywhere on the image. If needed, these areas can be sized differently, but the aspect ratio of the original will remain. (Found in Thumbnail Crop as well.)
    • Lock Aspect Ratio: Unchecking this box will allow for a different aspect ratio than what was selected in the drop down box. (Found in Thumbnail Crop as well.)
  • Thumbnail Crop: Nearly identical in function to the main image crop, the thumbnail crop allows for a selected region to be highlighted to act as the primary image thumbnail. To create the cropped thumbnail, select the crop-area. If you want the image resized to a specific dimension, check Resize Thumbnail and edit the size accordingly. Once you are satisified with the crop area and the options, click on the Create Thumbnail button.
  • Rotate: This tab allows three seperate methods of rotating. 1. Rotate Clockwise 90° (Turn Right), 2. Counter-Clockwise 90° (Left Turn) or 3. 180° (Flip). Clicking any of these buttons will rotate the original button. Do not repeatedly rotate the images as this will gradually degrade image quality.
  • Resize: This tab allows the for a longest-side resize of an original image. Simply input the desired dimensions and the image will be sized down to fit. Note, if the image is smaller in any one dimension that which was entered, it will not be sized up to fit, but rather, sized down in proportion with the longest side. If the image is entirely smaller than the dimensions entered, it will not be resized.
  • Backup: This tab allows for the backing-up of an image into a backup folder located within your image directory. When active, two buttons are displayed. The first, Backup will immediately copy the associated image to the backup directory and overwrite any identically named file. Clicking Restore will copy that image back to the main image directory but will still maintain the copied file in this location.

Offline

#66 2009-04-02 01:24:13

TheEric
Plugin Author
From: Wyoming
Registered: 2004-09-17
Posts: 566

Re: [plugin] [ORPHAN] ebl_image_edit v1.0

It should be available for download now.

Offline

#67 2009-04-02 01:26:32

TheEric
Plugin Author
From: Wyoming
Registered: 2004-09-17
Posts: 566

Re: [plugin] [ORPHAN] ebl_image_edit v1.0

And on a personal note, thank you VERY MUCH to everyone who has contributed. It helps.

Offline

#68 2009-04-02 01:54:56

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: [plugin] [ORPHAN] ebl_image_edit v1.0

Eric, you’re the man!

I’ve just had a go with the new version and have to say, it is fabulous!

Thanks again!

Offline

#69 2009-04-02 08:15:08

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: [plugin] [ORPHAN] ebl_image_edit v1.0

can’t wait to try it out. THANK YOU!


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#70 2009-04-03 18:40:51

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: [plugin] [ORPHAN] ebl_image_edit v1.0

I’ve been playing around with it some more – great plugin!

As you said:

The predefine sizes are set, but the user does have the ability to change that size. When I release the next version, I’ll add the ability to restrict the user from resizing the text-box from the defined-size tab.

I have a slightly different suggestion…

instead of locking the size could the behaviour be modified in such a way that if the users choose one of the predefined sizes, e.g. 500px square, only the aspect ratio would be locked but the resulting image would still be resized to exactly be 500px square no matter how they resize the crop rectangle? (Unless that would mean enlarging the image.)

The reason I’m asking is, in my experience users tend to upload images as they come from their cameras, so they are usually fairly large.

Offline

#71 2009-04-03 18:54:09

TheEric
Plugin Author
From: Wyoming
Registered: 2004-09-17
Posts: 566

Re: [plugin] [ORPHAN] ebl_image_edit v1.0

I don’t understand. Are we talking about images or thumbnails?

Offline

#72 2009-04-03 19:52:31

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: [plugin] [ORPHAN] ebl_image_edit v1.0

I was referring to the full-size image.

Let’s assume the user has just uploaded a 1600/1200px image and selects the 500px square preset. At the moment you get a square crop frame of that exact size, that can be repositioned. Once you’re happy with the framing, you click Crop and get a 500px image – perfect.

However if you resize the frame to crop for instance the center portion of the image (1200/1200px) discarding only bits left and right but preserving the full height you end up with an image that is 1200px square.

In that case you would need to resort to the Resize tab next to get it down to 500px square.

I was just thinking it might be more convenient for users, if they could choose from a set of predefined sizes in the Crop tab, resize the crop frame and crop/resize the image in a single step down to the specified size, saving one step.

Sorry if that doesn’t sound clear, but I was imagining it to work like the crop tool in Photoshop where you can input a fixed size and PS will constrain the frame’s aspect ratio accordingly.

Offline

Board footer

Powered by FluxBB