Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Picture upload with javascript to cut or choose only a part of a pic?

Quote Reply
Picture upload with javascript to cut or choose only a part of a pic?
I made myself a script where i can upload a picture, choose a part of the picture, crop and resize it.
But the whole story is made in php and really ugly. From now i want to give this possibility to my users also. is there any made solution for this?
Quote Reply
Re: [Robert] Picture upload with javascript to cut or choose only a part of a pic? In reply to
Hi,

Its not too simple to do. You would need a system to upload it, then a plugin (such as http://deepliquid.com/content/Jcrop.html), and then a way to "save" that new cropped image to the server, ready to be used. I've tried it before - but it was a real git to do - so I gave up (was only on a personal site)

The closest thing is my Thumb_Images plugin, BUT that doesn't offer a crop feature - it simply resizes the images for you (to given dimensions)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Picture upload with javascript to cut or choose only a part of a pic? In reply to
It is not really hard to use a library and change an example to own needs.
The only thing is to understand how LSQL stores pictures, but i made this also.

Another thing i have to do is to manage a way to manage uploaded pictures before changing them in the Link, but i will do this also in some hours.

But for shure a plugin in perl made for LSQL would be more nice than an additional php-script.
After such a long time ( i was not here for years) i thought that a lot of people would have asked for something like this.

The picture shows my solution only for mods. The info is to know whats happen, the fields are for testing also.
Without you have only a picture where you can choose a part and then it will be cropped to a fix size or to a size choosen by myself with a field.


Quote Reply
Re: [Robert] Picture upload with javascript to cut or choose only a part of a pic? In reply to
Hi,

I could certainly have a go at a plugin like that, but unfortunately the demand just isn't here any more for new plugins it would seem :( I've been doing a load of re-writes of some of my old plugins (especially those that were made YEARS ago), but those are just the more popular ones (no point spending ages re-doing plugins that people don't use, ya? ;))

I'm *really* busy at the moment - but if I get a chance, I'll try and have a play with it. It would really need to be an extra page AFTER the adding of the item, so you can edit the image at the sever end. The problem then comes into play, when you have the modification validation queue (where it gets saved in the Changes table), etc etc. I know I had a lot of fun getting the AJAX upload plugin going!

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!