Skip to content

Instantly share code, notes, and snippets.

@yamilethmedina
Created February 27, 2016 18:52
Show Gist options
  • Save yamilethmedina/459cb460881198267d79 to your computer and use it in GitHub Desktop.
Save yamilethmedina/459cb460881198267d79 to your computer and use it in GitHub Desktop.
<?php
require 'plugins/lib/WideImage.php';
require 'plugins/lib/Operation/ExifOrient.php';
date_default_timezone_set('America/New_York');
// Vars to hold user inputs
$name = "";
$speaks = "";
// Error Vars
$formError = "";
// Directories & file paths
$userFolderPath = "";
$userImagePath = "";
$userImagePathRelativeToPluginFolder = "";
$newImagePath = null;
$exif = exif_read_data($userImagePath);
$image = WideImage::load($userImagePath);
​$transformation = new WideImage_Operation_ExifOrient();
$transformation->execute($image, $exif['Orientation']);
$image->saveToFile($imageWithText);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment