Đã Hủy

Photo upload orientation--- $10 to solve this problem

The code below makes photos display on site with the right orientation.

The problem is that some jpeg/jpg that DO NOT need orientation just gets stuck at 100% upload (no errors.)

This is in the model:

public function saveFile($attribute)

{

$path = Yii::getAlias('@app/' . Videos::FILE_PATH_LOCAL);

$this->uid = VideosHelper::generateUniqueIdHash();

$this->video_extension = $this->video->extension;

$this->video_file = $path . '/' . $this->uid . '.' . $this->video_extension;

if (!$this->video->saveAs($this->video_file)) {

$this->addError($attribute, 'Error save video.');

}

else {

if($this->video_extension == 'jpeg' || $this->video_extension == 'jpg') {

VideosHelper::fixImageOrientation($this->video_file);

}

}

}

This is in the helper:

public static function fixImageOrientation($filename) {

$exif = exif_read_data($filename);

if (!empty($exif['Orientation'])) {

$image = imagecreatefromjpeg($filename);

switch ($exif['Orientation']) {

case 3:

$image = imagerotate($image, 180, 0);

break;

case 6:

$image = imagerotate($image, -90, 0);

break;

case 8:

$image = imagerotate($image, 90, 0);

break;

}

imagejpeg($image, $filename, 90);

}

}

Kỹ năng: Bootstrap, PHP, Yii

Xem thêm: clipbucket photo upload problem, oscommerce problem photo upload, multi photo upload, multiple photo upload, photo upload php, resize photo upload, photo upload resize, photo upload editor, photo upload via phone, html photo upload script, photo upload website, photo upload resize php, myspace photo upload software, photo upload site

Về Bên Thuê:
( 8 nhận xét ) Fort St John, Canada

Mã Dự Án: #14782451

10 freelancer đang chào giá trung bình $25 cho công việc này

Tushar051

I have above 5yr of experience in Web Development & Designing, Web application development. Relevant Skills and Experience My strengths are in PHP, Codeigniter, Laravel, Wordpress, Magento, Opencart, Smarty, MySql, Ja Thêm

$20 CAD trong 1 ngày
(11 Đánh Giá)
4.4
MiniBigTech

looking for a creative developer? search no further, because I am ready to do this job. With 6 years experience, efficiently coding websites and application using modern HTML, CSS and Java script. Relevant Skills and Thêm

$25 CAD trong 1 ngày
(22 Đánh Giá)
4.2
amitytech2014

Hi we are a company working here in freelancer, we have expertise team working on our projects from last 13yrs, we biding for low just because we need reviews & ratings and to showcase our work. Relevant Skills and Ex Thêm

$35 CAD trong 1 ngày
(12 Đánh Giá)
3.2
kalsariyavanraj

hi, I am expert in you framework. so I will resolved quickly it. please come in chat and discuss with me.

$30 CAD trong 1 ngày
(7 Đánh Giá)
3.0
EXPERANTO

We are experts in Prestashop, Magento, WooCommerce, Oscommerce , Wordpress, Joomla, Web Hosting Panels Programming .. Relevant Skills and Experience We do Website Design, Web Applications, Logo Designs, Database relat Thêm

$25 CAD trong 1 ngày
(1 Đánh Giá)
2.5
sambayour

A proposal has not yet been provided

$30 CAD trong 1 ngày
(3 Đánh Giá)
2.2
$25 CAD trong 1 ngày
(0 Đánh Giá)
0.0
busywizzy

CLICK ON CHAT , SO I CAN SHOW MY EXPERIENCE REGARDING THE PROJECT. PHP and Wordpress,DRUPAL, LARAVEL, MAGENTO,CODEIGNITOR, IONIC, Mobile Apps, PSD to HTML , Amazon and ebay web services Relevant Skills and Experience Thêm

$10 CAD trong 1 ngày
(0 Đánh Giá)
0.0
thelastsummer

I am an expert in yii Relevant Skills and Experience yii, php Proposed Milestones $12.5 CAD - for start $12.5 CAD - for complete

$25 CAD trong 1 ngày
(0 Đánh Giá)
0.0
shiza3041

A proposal has not yet been provided

$25 CAD trong 1 ngày
(0 Đánh Giá)
0.0