When I upload vertical photo it shows sideway in my php website - php

When I upload vertical photo, after uploading it display sideway.
I am using uploadify, and doing simple croping of the image using jQuery Jcrop.
Can anybody give me solution?

check your css class for displaying image and height and width of the image that you are displaying.

Related

Need to have Watermark on each image in preview and even after downloading in Laravel PHP script

I have a site where I use Laravel. It's for stock images, and when each image is previewed there's a watermark in the corner.
However, when I download the image the watermark is not on the image.
It currently only works when previewing the image.
Any ideas on what I'm doing wrong?
Image::make($temp.$preview)
->insert('public/img/watermark.png','bottom-left')
->save($temp.$preview)
->destroy();

Mask/Merge an image to another image in PHP GD

I have a requirement I need to merge/mask an image to its cover image. please see below pics
Cover image- (png mask)
Customer Photo
Final Image
Is this possible in PHP GD? Finally it should generate a single image.
Thanks!

Image upload crop resize save to folder

I want from user to upload an image of any size for (jpg,png,gif) format. After uploading the image I want him to crop the image (client side) using jquery and save that cropped image (php) to application folder.
Please tell me the feasible solution to make this functionality working fine.
ImageMagick is used for croping images:
http://www.sitepoint.com/crop-and-resize-images-with-imagemagick/
For using ajax:
http://www.sanwebe.com/2012/05/ajax-image-upload-and-resize-with-jquery-and-php
Given that you already have the PHP code to crop, use one of this plugins to allow the user define how she wants to crop the image and provide the data you need:
Guillotine: Very lightweight plugin that allows to crop, zoom and rotate images with touch support and it's responsive (demo).
Jcrop: Allows free selection cropping (demo).
It is simple image crop using jquery and php using cropbox.js
Please watch the following video
Simple image crop

How to upload image with jQuery re-size and crop (jrac)

Help me please, I need to use jrac or some jQuery plugins then upload it using PHP. Using jrac I can only re-size and crop, I'm stuck in uploading.
You firstly have to resize it according to the new width nad height than pick the cropped portion of new image.
I have code. Do you still need this?

Image upload in a registration form with image preview and cropping tool using PHP yii framework?

How can I upload an image in a registration form with image preview and cropping tool using PHP yii framework?
I have a user registration form in my yii framework and want to include an image upload for the user image. I want that the image in uploaded and directly displayed in the form after the upload was successful. After that I want to resize and crop the image and when the create user form is submitted the image should be saved and the user record should contain the url to the image in order to display it later.
How can I set a fixed size for the image to be stored? I.e., when I want to have the image in width 200px x height 300px for example.
For live preview before updating you can use html5 File API.
I advice you to look in these links:
file-api-example
https://developer.mozilla.org/en/Using_files_from_web_applications
For cropping images on the server side, please use following yii extension:
http://www.yiiframework.com/extension/image/
You can also let the user crop image on the client side. You can define the fixed aspect ratio and let the select part of the image. I personally use Jcrop javascript library.
You want to have the image to be 200px x 300px. AspectRadio is 0.67 in this case. You define aspectRatio in Jcrop:
jcr = $.Jcrop('#imageDisplay');
jcr.setOptions({
trackDocument: true,
aspectRatio: 0.74,
Since your aspect ratio is fixed, you only have to resize the image to 200px x 300px using the mentioned extension.

Categories