Page 1 of 2

Thumbnail creation from shell possible?

Posted: 09 Sep 2016, 10:27
by marcel77
Hi all,

is it possible, to start thumbnail create process from a shell? And maybe more than one paralell thread? I have to do lot of creation at one time, and at the moment I have to spend 2 seconds per image.

Best regards
Marcel

Re: Thumbnail creation from shell possible?

Posted: 10 Sep 2016, 23:46
by Jan
Hi, for now there is no such option, but you can run it e.g. on your PC - on localhost - create all the thumbnails and then copy all the images include their thumbnails to your server.

Jan

Re: Thumbnail creation from shell possible?

Posted: 11 Sep 2016, 11:22
by babu65
Hi Jan,
I know, but that's just what I want to avoid, because there are thousands of images in the site and every week I've 300/400 new images.

P.S. I don't receive by mail the notification of reply at all my post, I've try change my address in the profile but I can't. Do you know why?

Re: Thumbnail creation from shell possible?

Posted: 11 Sep 2016, 23:45
by Jan
Hi, hmm, no idea, testing now the mail function, seems it works OK here :idea:

Ok, but what is the problem to prepare the images on your PC and upload them to your server?

Jan

Re: Thumbnail creation from shell possible?

Posted: 11 Sep 2016, 23:57
by marcel77
It's not so easy, like doing nothing :)

And I have to upload file fourth. Maybe I have to try scripting something at the Webserver....

Re: Thumbnail creation from shell possible?

Posted: 12 Sep 2016, 22:12
by Jan
Yes, unfortunately, I cannot give any clue advice there, as I didn't test to run some script from a shell. Everything I build, is designed for using in browser - include admministration, etc. (even for my self, when I use php for specific tasks on my PC, I do it for browser use).

The problem is, now, the class for creating thumbnails is linked to all the Joomla! system, so running it through shell will be problematic :-( - I think, for this new script needs to be written :-(

Re: Thumbnail creation from shell possible?

Posted: 12 Sep 2016, 22:27
by marcel77
Which class do you use? I thought about using ImageMagick? Now I have to search a free time slot :)

I only don`t want to spend time for a function, that maybe already exists.

Thank you!

Re: Thumbnail creation from shell possible?

Posted: 12 Sep 2016, 22:35
by Jan
Hi, yes, I have made specific imagemagick function (based on different code, guides and experiences by different authors):

administrator\components\com_phocagallery\libraries\phocagallery\image\imagemagic.php

PhocaGalleryImageMagic::imageMagic()

But for writing files on the server, or checking them, etc., it uses Joomla! framwork, so all this needs to be modified (even there are different options and parameters - how to write files - without FTP, with FTP, directly or store them with help of ob_get_contents(), etc.)

Jan

Re: Thumbnail creation from shell possible?

Posted: 13 Sep 2016, 09:00
by marcel77
Hi Jan,

this is more assistance, I have expected! So you use imagemagick too.

My Idea is, to do complete upload by FTP, using multi adding within PhocaGallery, but create the thumbnails with a shell script on the webserver. At some days I add > 5000 pictures in lot of subfolders. I hope, doing creation by shell is going much faster.

Thanks a lot.

Marcel

Re: Thumbnail creation from shell possible?

Posted: 13 Sep 2016, 12:28
by Jan
Ok