Thumbnail creation from shell possible?

Phoca Gallery - image gallery extension
marcel77
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 22 Apr 2016, 12:03

Thumbnail creation from shell possible?

Post by marcel77 » 09 Sep 2016, 10:27

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

Tags:

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 44227
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Thumbnail creation from shell possible?

Post by Jan » 10 Sep 2016, 23:46

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
If you find Phoca extensions useful, please support the project

babu65
Phoca Member
Phoca Member
Posts: 47
Joined: 11 Nov 2013, 20:15

Re: Thumbnail creation from shell possible?

Post by babu65 » 11 Sep 2016, 11:22

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?

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 44227
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Thumbnail creation from shell possible?

Post by Jan » 11 Sep 2016, 23:45

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
If you find Phoca extensions useful, please support the project

marcel77
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 22 Apr 2016, 12:03

Re: Thumbnail creation from shell possible?

Post by marcel77 » 11 Sep 2016, 23:57

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....

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 44227
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Thumbnail creation from shell possible?

Post by Jan » 12 Sep 2016, 22:12

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 :-(
If you find Phoca extensions useful, please support the project

marcel77
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 22 Apr 2016, 12:03

Re: Thumbnail creation from shell possible?

Post by marcel77 » 12 Sep 2016, 22:27

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!

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 44227
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Thumbnail creation from shell possible?

Post by Jan » 12 Sep 2016, 22:35

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
If you find Phoca extensions useful, please support the project

marcel77
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 22 Apr 2016, 12:03

Re: Thumbnail creation from shell possible?

Post by marcel77 » 13 Sep 2016, 09:00

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

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 44227
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Thumbnail creation from shell possible?

Post by Jan » 13 Sep 2016, 12:28

Ok
If you find Phoca extensions useful, please support the project

Post Reply