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.
Related
I made a basic upload script by using the w3schools tutorial (here) and I was basically wondering if there was anyway to increase the upload size to above 5Gb. I tried changing the script to upload large video files but it errors telling me that the file is too big.
Would anyone be able to help me with the issue that I am having
To try the uploader for yourselves (uploader), it accepts .mov formats, but like I say my error lies within the upload file size.
As others mentioned in the comments you can 'chunk' the file into slices, and upload them piece-by-piece. The server will merge the files after all slices were uploaded.
A working demo for this is http://dnduploader.filkor.org.
You can learn from it's source code, what you can find on Github (see the FAQ section on the page).
In general, it's not an easy task to create such an uploader, but from it you can learn some novel ideas about the current 'trends' of file uploading..
As mentioned by Critical Point, you will most likely need to chunk the upload.
There are a number of other additional factors to be aware of - for example error recovery and connection interruption.
It may not be suitable for your uses, but in the past I have had success using a commercial component:
http://www.aurigma.com/UploadSuite/
There is a fairly steep entry price, but provided are multi-platform components for both client and server side. In terms of comparison to building and troubleshooting a home-made solution, Aurigma provides great ROI.
My website is showing same image, one normal and other is blurred and I'm thinking what is better method of doing it in terms of speed. Create two images upon uploading where it uploads one normal image and one blurred to server or upload only one image but blur second one on the fly using gd?
If you're using GD, I would do it at upload and save them as flat files.
Apache and other web servers can serve flat files remarkably fast.
However, I would look into using http://www.graphicsmagick.org/ to do the image manipulation. It's much, much faster and efficient than Imagemagick and most certainly PHP's GD.
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
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
Can I programatically change the quality of a PDF?
I have a client that is a newspaper, and when they submit the PDF form of the paper to their site they are submitting the same copy they send to the printer which can range from 30-50Mb. I can manually lower the quality (still plenty high for the web) and it will be 3-5Mb so this will help my hosting substantially.
That seems like something that would require nothing short of the Adobe PDF SDK / libraries. I have worked with them quite bit, but I have never attempted to change the resolution of an existing PDF. The libraries are pricey so it's likely that is not an option for you.
I want to say that Perl's PDF::API2 has an optimize script bundled with it, but I have never used that functionality. It may be worth a look. The module itself is pretty thorough. Although, a PDF that large not be that fastest to process with it.
You should check TCPDF library or php documentation.
I never worked with pdfs in php, but I think you can do that you need with TCPDF easily. If your pdf is composed by images, check this example, maybe help you.
Regards
Zend_Pdf is the best Free library for reading and manipulating existing PDFs, but it does not go nearly deep enough to do what you need. I do not believe there is a PHP library for manipulating PDF files at that level (that is, being able to extract embedded images and replace them with lower quality versions).