Topic: Photocrop - image uploader + resizing/ cropping tool  (Read 4215 times)

Pages: [1] 2  All   Go Down

#1: 7-Dec-2009, 11:56 AM

alik
Posts: 194

WWW
Photocrop is a configurable frontend image uploader and resizing/ cropping/ editing tool. It enables users to upload image onto a website, transparently reduces the image's size to a preconfigured limit, and finally allows for online editing of the uploaded image. Photocrop can be accessed by users who are logged into the site's manager.

Full article + download: http://setpro.pl/software/photocrop
Live demo: http://photocrop.setpro.pl/
Twitter: http://twitter.com/photocrop
« Last Edit: 2-Jan-2010, 11:03 AM by alik »

#2: 7-Dec-2009, 01:21 PM


sharkbait
Posts: 2,004

hi alik,

nice, thanks for sharing! Smiley

is there a way to configure the thumbnails (size & format)?
...and apparently it is possible to customize the thumbnail/image/link/lightbox output in the frontend, right?

cheers, j

*edit: picture added Smiley
« Last Edit: 7-Dec-2009, 02:08 PM by sharkbait »

#3: 7-Dec-2009, 02:05 PM

j_p
Posts: 116

Awesome, could be very useful - thanks alik.

#4: 7-Dec-2009, 02:11 PM

alik
Posts: 194

WWW
2 Sharkbait:
Sizes of images/thumbnails are controlled by three parameters -- MAX_SQUARE, MAX_WIDTH, and MAX_HEIGHT -- that you can set in configuration file for Photocrop. Precedence/priority of these parameters is described in the article ("Resizing policy" section). There are two sets of such parameters: IMAGE_MAX_... and THUMB_MAX_... that control images and thumbnails,respectively, within editor (Photocrop). How images/thumbnails are displayed on the actual frontend site -- it's completely up to you. On my demo site I am also using Photocrop's internal thumbnailer/imager for displaying photos on the public frontend.

#5: 7-Dec-2009, 04:14 PM


bunk58
Posts: 1,969

David Bunker

WWW
Excellent  Grin
I've just uploaded, had it resized then custom cropped a photo of my a castle.
Great work alik.

#6: 7-Dec-2009, 08:11 PM


mrhaw
Posts: 2,237

modx == freedom

WWW
WOW!!!!!!  Cool
My playground: http://4up2date.info | Twitter: mrhaw
---> Check out: ReadSpeaker webReader Plugin | Support/Comments Thread

--=[ MR. HAW ]=--

#7: 7-Dec-2009, 08:40 PM


goldsky
Posts: 1,046

Less is more

WWW
photocrop+maxigallery would be awesome!
Rico
on MODx 1.0.2 // Apache 2.0.63 (Win32) // PHP 5.2.6  // MySQL 5.0.81 (3306) // MySQL 4.1.22 (3307)
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it good makes it perfect!
Indonesia MODx Forum // MODx Evo's cheatsheets // IE 6 must die ! // Easy 2 Gallery 1.4.x : SVN : Git : WIKI : Download : Examples

#8: 8-Dec-2009, 07:42 AM

alik
Posts: 194

WWW
2 Goldsky
Under consideration.

#9: 9-Dec-2009, 01:51 AM

alik
Posts: 194

WWW
Photocrop + Maxigallery example is working on the demo site at http://dev.setpro.pl/ -- I have built this example with no changes to Photocrop's core code. However, the use of such scenario in multi-gallery environment requires Photocrop's core to be slightly adjusted -- particularly its statically-built configuration. This task is on my todo-list -- new release will smoothly work with many instances of Maxigallery.

#10: 9-Dec-2009, 02:24 AM


goldsky
Posts: 1,046

Less is more

WWW
AWESOME!!!

What's the trick? Cheesy
Rico
on MODx 1.0.2 // Apache 2.0.63 (Win32) // PHP 5.2.6  // MySQL 5.0.81 (3306) // MySQL 4.1.22 (3307)
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it good makes it perfect!
Indonesia MODx Forum // MODx Evo's cheatsheets // IE 6 must die ! // Easy 2 Gallery 1.4.x : SVN : Git : WIKI : Download : Examples

#11: 17-Dec-2009, 06:10 PM

alik
Posts: 194

WWW
New and improved release: half a step from an image uploader towards a simple graphics processor. Live demo at http://dev.setpro.pl/ has been upgraded to this newest version. Twitter available -- http://twitter.com/photocrop

#12: 17-Dec-2009, 07:01 PM

Testers

dev_cw
Posts: 4,218

WWW
Very coo!!!!  Grin
Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

Something is happening here, but you don't know what it is.
Do you, Mr. Jones?  -  [bob dylan]

#13: 17-Dec-2009, 09:32 PM


goldsky
Posts: 1,046

Less is more

WWW
PHP error debug
  Error:    preg_match() [function.preg-match]: Compilation failed: PCRE does not support \L, \l, \N, \U, or \u at offset 4   
  Error type/ Nr.:    Warning - 2   
  File:    D:\localhost\modx\assets\photocrop\config.default.inc.php   
  Line:    96   
  Line 96 source:    if (!preg_match('#^' . $configuration['RESOURCE_BASE'] . '#', $configuration['RESOURCE_PATH'])) {


It happens when it's opening the [!Photocrop!] blank page.
« Last Edit: 17-Dec-2009, 09:37 PM by goldsky »
Rico
on MODx 1.0.2 // Apache 2.0.63 (Win32) // PHP 5.2.6  // MySQL 5.0.81 (3306) // MySQL 4.1.22 (3307)
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it good makes it perfect!
Indonesia MODx Forum // MODx Evo's cheatsheets // IE 6 must die ! // Easy 2 Gallery 1.4.x : SVN : Git : WIKI : Download : Examples

#14: 18-Dec-2009, 03:55 AM

alik
Posts: 194

WWW
Thanks for reporting. Yes, it occurs while running site/application in Windows environment. While moving my code to PHP5 OO format I also did some autocalculations on paths with regard to make life easier for a user of my application. But also I silently assumed that all remaining part of the world works in a way similar to mine -- build on Linux, move to production Linux, forget Wink

I improved crucial points in the code and hope that now it will also work within xampp or similar environment -- package with newer date available for downloads.
« Last Edit: 18-Dec-2009, 04:11 AM by alik »

#15: 18-Dec-2009, 05:33 AM


kp52
Posts: 532

WWW
Great stuff! I've been trying to teach someone to resize before uploading using Irfanview for quite a while now, but it never seems to stick... Maybe I can use some of this on her site.
 Cheesy KP

#16: 18-Dec-2009, 10:43 AM

alik
Posts: 194

WWW
2goldsky once again + all those using Windows:
I have set up a MODx-driven site within my [unused over recent year] xampp environment and fixed a number of issues which caused parse errors. Now Photocrop available for download under the article (http://setpro.pl/software/photocrop#attachments) should work [more or less] smoothly regardless of the server's OS.

#17: 18-Dec-2009, 12:19 PM


goldsky
Posts: 1,046

Less is more

WWW
It works!
Thank you Cheesy

Anyway,
why don't you create "Make a copy" option?
There is no backup before editing.
And how to change the "User-defined selection"?
Rico
on MODx 1.0.2 // Apache 2.0.63 (Win32) // PHP 5.2.6  // MySQL 5.0.81 (3306) // MySQL 4.1.22 (3307)
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it good makes it perfect!
Indonesia MODx Forum // MODx Evo's cheatsheets // IE 6 must die ! // Easy 2 Gallery 1.4.x : SVN : Git : WIKI : Download : Examples

#18: 18-Dec-2009, 12:33 PM

alik
Posts: 194

WWW
"User-defined selections" are set in config file -> "assets/photocrop/config.default.inc.php"
There is an array "$this->config['USER_BUTTONS']" which you can customize. I would recommend you to duplicate "config.default.inc.php" to something like "config.myproject.inc.php", next do customization in a duplicate, and finally call application on its hosting page as [!Photocrop? &config=`myproject`!]. This will prevent your custom button settings from being overwritten during further upgrade.

"Make a copy" -- just taken onto my to-consider/to-do list.

#19: 20-Dec-2009, 06:45 AM


goldsky
Posts: 1,046

Less is more

WWW
[[PhotocropLink? &idApp=`xyz` &RESOURCE_URL=`assets/galleries/[*id*]/`]]

is not working to the MaxiGallery's image folder.

My example goes to this URL:
http://localhost/modx/index.php?id=19?RESOURCE_URL=assets/galleries/18/

Anyway,
Why do you have to use another document page?
Why not using a stand-alone pop-up window to do the cropping?
Rico
on MODx 1.0.2 // Apache 2.0.63 (Win32) // PHP 5.2.6  // MySQL 5.0.81 (3306) // MySQL 4.1.22 (3307)
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it good makes it perfect!
Indonesia MODx Forum // MODx Evo's cheatsheets // IE 6 must die ! // Easy 2 Gallery 1.4.x : SVN : Git : WIKI : Download : Examples

#20: 20-Dec-2009, 06:56 AM

alik
Posts: 194

WWW
It looks that you have not performed full upgrade ("PhotocropLink" snippet was not overwritten with the newest version; it is located under assets/photocrop/snippets/*.txt).
Pages: [1] 2  All   Go Up
0 Members and 1 Guest are viewing this topic.