Joomla+Phoca Gallery+Site goes down when I enable thumbnail creation - php

I have phoca gallery installed and was working fine before yesterday.From yesterday I was getting an error of out of memory. So I set the upload limit to infinite. Now after that when I enabled Thumbnail creation, the whole site goes down, and an error was show in some line number 212 on the file ImageMagik.php . But as I have read in the user manual Phoca gallery uses GD Library rather than ImageMagik. Can anyone suggest me what could be the problem behind this. I want to solve it as soon as possible, and due to this client has asked to look for another solution than this. Please help!

this is mostly caused by memory error. In fact, there are two options you can do:
increase memory limmit on your server (if you are able to do)
or remove or reduce the size of images on the server.
See the Info panel in Phoca Gallery, there you will see the recommendation for the Phoca Gallery settings.
You can try to enable Pagination Thumbnail creating which saves a lot of memory while searching for images which do not have thumbnails yet (automatically thumbnail creating)
Yes, Phoca Gallery uses GD library, the imagemagic is an internal function where Phoca Gallery tries to use GD library to create thumbnails.
Jan

Related

Generating pdfs with pdflib all images are blurry

we are currently working on a PHP project for one of our customers where we had to increase the PHP version (5.6.40) and the version of PDFLIB (9.1.1.p3). Since then we have the problem that all images are blurred, as if there is a white veil over them. We don't understand what the reason can be, because there have been no changes in the code.
before update
after Update
When I look at the pictures, two possible causes come to mind:
The colour profile in the image is sometimes processed and sometimes not.
an intermediate step processes the images before they are loaded and that has also changed.
It would also be good to know which PDFlib version you used before and whether the image is also manipulated on the server.
Probably the best thing to do is to open a support case directly with PDFlib support. https://www.pdflib.com/licensing-support/opening-a-support-case/
Then you can also send more details and an example PDF before and after the update. It is also best to share an example input image.

tint images without imagemagick

I have an upload form for images that once uploaded are then displayed automatically and randomly on a website. I would like to apply a colour tint to the images before they are saved, at the very least one green but preferably various colour tints which are saved in relevant folders /green/ /red/ /blue/ etc. so I can make skins for the site.
My hosting package doesn't allow me to install imagemagick so I'm looking for a way to achieve these results in html css and php preferably, as that's where my limited knowledge lies, but if that's not possible I will consider other options.
is gdlib enabled?
or you use aviary or one of their apis http://developers.aviary.com/filter-list
http://developers.aviary.com/
Update: as Aviary is no more offering this service as before but here are some more good solutions:
take a look at Pixastic (coloradjust)
https://github.com/jseidelin/pixastic
http://www.pixastic.com/lib/docs/actions/coloradjust/
or PaintbrushJS (colour tint)
https://github.com/mezzoblue/PaintbrushJS
http://mezzoblue.github.com/PaintbrushJS/demo/
If the PHP on your hosting package is compiled with the GD library you could use that instead. imagefilter

Pdf on web page: best solution

I need to include pdf files in some webpages, and I'm gettin' in troubles.
The app is a simple newspaper's archive, in which i can read right on page or download as pdf files, one file per page. What my customer can provide me is one pdf file for each page; what my customer wants from me is to navigate them in indexes (with page thumbnail) and have a read from a choosen one direcly in page; I'm using php/mysql.
I started trying out to use the <object> tag with type="application/pdf", but i found it's deprecate 'cause it's not crossplatform at all (there's no support on linux's browsers, but even my windows' firefox 3.5 couldn't show me anything).
I guessed I could transform that pdf in something different (html or simply images are good enough), but the only thing i found is ImageMagick, that I cannot use as I must install on server and I can't, as I'm not admin of that machine.
So, I'm finally looking for suggestions
Thanks
Display the pdf inline using an IFRAME. The thumbnail you can generate with imageMagik. You should be able to use the command line version of ImageMagik to resize and convert to jpg.
edit
Your best bet is to talk to the server admin and have them install php support for ImageMagik then you can use it as a class.
If you can't get support to install on the server, you will have to use the command line version.
You might be able to Google around for a library that wraps the command line, but it would be trivial to write it yourself.
With this in place you can create a large readable black and white png for each page. It should click through to the pdf.

How would I go about cropping an image automatically on the server?

Like at Digg.com, I want to get members' pictures cropped for an avatar use. Please show me how to do this in PHP.
Here is a free script that does it using either GD or Imagick (Imagick is faster so I would use that):
Crop & Resize with JavaScript, PHP, and ImageMagick
From near the top of the page linked above:
Update: A new version of this example
and demonstration has been released.
Version 1.1 includes a GD version of
the script as well as a number of
functional improvements worth checking
out.

PHP Replace Images with GD Library Resampled Images in Joomla

I am the tech intern for an online independent newspaper, and the writers on the staff are not tech-savvy. They don't quite understand how web pages work, and often they upload and include images straight from their digital cameras, or scanned from original media. These images become a burden when there are 10 images on the front page each at 3.5Mb each.
We are trying to work out some sort of training method for teaching them how to resize and optimize the images they want to include in their articles, but like I said, they are not very tech savvy, and any method we attempt to employ may go way over their heads.
So, I wanted to know if it is outside of reason to attempt to resample and cache images that are included in the articles using a PHP function and the GD library in order to stream line the amount of data that has to be passed per article.
I think it's possible, I'm just trying to figure out if it would be worth it to just take the time and effort to train the writers, or if creating an automated process would be better.
You'd be better off doing the GD image processing during the upload process. GD can take up quite a bit of resources, so processing each image on every request would not be a preferable solution. If you can't do it during the upload process, you should cache all the resampled images and use those if/when available.
It's certainly possible, and I'd be very surprised if Joomla! doesn't already have modules that do just that.
With the current web site that I'm working on I needed to answer a similar question. I've opted for using the joomla addon Easy Gallery. The two stand out features for me are the automated thumbnail creation and the image resize feature. The sizes are configurable with the components configuration page. You'll have a thumbnail, a resized image and the original image with each upload.
This component is a Joomla 1.0 component, so, if you're running a Joomla 1.5 install you will need to turn on legacy mode. Work seems to be in progress for a native 1.5 version.
I also found a couple of places where the generated thumbnails weren't being displayed. I raised the question on the Easy Gallery forum, and managed to work out the answer for myself.

Categories