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
Related
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.
Background: For an university project I have to use PHP5 to create a web application that also deals with images. I'm not allowed to use any external APIs, frameworks or AJAX.
Is there a native function to resize images in PHP5?
(I know a can specify both width and height for an img tag, but that resizing is done on the client. I'd rather save downsized images on the server.)
The GD library has been bundled with PHP since 4.3, and will do what you want: http://uk.php.net/manual/en/book.image.php. You'll probably want something like imagecopyresampled.
Most PHP installations come bundled with the GD library. In fact, I've yet to come across a PHP installation that doesn't have GD bundled.
I want to have a user upload a image to my website and have a series of Photoshop actions like adding a layer behind of that image, a layer infront and some dynamic text with effects applied to it like drop shadow and gradient overlay. Is this even possible?
Have a look at Various Image Processing and Generation functions provided by PHP mainly ImageMagick & GD. If that does not prove to be sufficient,
Consider Gimp command line. you can easily invoke it from php using exec() function. GIMP is full featured & can do almost all fancy Photoshop actions you would want. And its free!
Hope it helps
PHP libraries are available to perform some basic graphics manipulation, as mentioned in the other answer. If these aren't adequate for you, it looks as though you can run and script the normal Photoshop program on your server. Photoshop is not available for Linux, so you'd probably need a Windows server. (This wouldn't be doable on shared hosting, you'd probably need a decent VPS at least.)
I haven't done this before, but according to Adobe Photoshop Scripting documentation your language choices are JavaScript and VBScript. Someone could write a PHP library to access this, but I don't know of anything like that.
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.
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.