Tag Archives: tips

LrPC – Lightroom Preset Creator

Photography can be a challenging task these days with all the different editing tools out there it is sometimes hard to come up with a creative and different look. Look no more and check out LrPC, the Lightroom Preset Creator. LrPC is a tool that you can use to create Lightroom Presets with random settings applied to your photo. Did you say random settings? Yes I did, the tool allows you to select the different groups of settings in Lightroom and randomly generate a setting for it, then package it into a preset that you can Import directly into Lightroom and use on your own.

The tool was created to allow advanced users to have some fun in apply settings at random as well as new users to see how different settings might affect a pictures outcome all with random setting choice.

Simply visit the site LrPC to get started.

  1. Click on Start Creating
  2. Choose the settings you want to randomize from Basic, HSL (Hue, Saturation and Luminance), Black and White, Tone Curve and Split Toning
  3. Enable Profile Correction if you want to Enable Lens Corrections
  4. Click Create
  5. Download and Import into Lightroom

check out some sample before and after images created using LrPC LrPC Sample Images

EXIF Shortcode for WordPress Update

I previously posted about a function I wrote to parse exif data and present it in the format that I was wanted to see and the shortcode that I created to add it to my site. I decided to make some modifications to the function to fix up some errors that I found and update the wording. If you want to use it feel free to copt the code below and add to your own custom shortcodes in you side.

Here is an example output of the shortcode:

Gear:
Camera: Canon EOS 5D Mark III
Lens: EF24-70mm f/2.8L II USM at 35mm
Aperture: f/2.8
Shutter Speed: 1/8000 of a second
ISO: 100
Tripod: Handheld


Here is how to use the shortcode in your post:

[myexif tripod="no"]http://allenserh.at/wp-content/uploads/2015/09/8Q4A5659-original-web.jpg[/myexif]

To setup the whole thing the following code was added to a file called shortcode.php which I placed in the root of my theme folder and then used a include statement in the functions.php file to include shortcode.php. This shortcode.php file can also be packaged into a plugin which I may do so you don’t have to modify any existing code.

<?php
function getExifCustom($atts, $content = null) {
	$customExif = "<strong>Gear:</strong><br />\n";

	extract(shortcode_atts(array(
		"tripod" => 'yes'
	), $atts));

	$exif = exif_read_data($content, 0, true);
	foreach ($exif as $key => $section) {
    	foreach ($section as $name => $val) {
    		if ($key == "IFD0" & $name == "Model"){
        		$cameraExif = "Camera: ".$val."<br />\n";
        	}
    		if ($key == "EXIF" & $name == "UndefinedTag:0xA434"){
        		$lensExif = "Lens: ".$val;
    		}
    		if ($key == "EXIF" & $name == "FocalLength"){
    			$val = strstr($val, "/", true);
        		$flExif = $val."mm<br />\n";
    		}
    		if ($key == "EXIF" & $name == "ExposureTime"){
    		    $valS = explode('/', $val);
    			$valL = $valS[0];	
    			$valR = $valS[1];
    			
    			//If the Shutter Speed is less than 1 second (eg 1/250 or 1/1000)
    			if ($valL == "1" & $valR > "1" & $valR !== "10") {
    				$shutterSpeed = $val." of a second";
    			}
    			
    			//if Shutter Shutter Speed is less than 1 seconnd (eg 3/10 or 7/10)
    			if (($valL > "1" || $valL < "9") & $valR == "10") {
    				$shutterSpeed = $val. " of a second";
    			}
    			
    			//if Shutter Speed is greater than 1 and not a whole digit (eg 1.3 or 2.6)
    			if (($valL > "10") & $valR == "10") {
    			    $ivalL = intval ($valL);
    			    $ivalR = intval ($valR);
    			    $iShutterSpeed = $ivalL / $ivalR;
    				$shutterSpeed = $iShutterSpeed." seconds";
    			}
    			
    			//if Shutter Speed is greater than 1 and a whole digit (eg 4 or 30)
    			if ($valL > "1" & $valR == "1") {
    				$shutterSpeed = $valL." seconds";
    			}
    			
    			//if Shutter Speed is exactly 1 second
    			if ($valL == "1" & $valR == "1") {
    				$shutterSpeed = $valL." second";
    			}
    			
    			
    			$shutterExif = "Shutter Speed: ".$shutterSpeed."<br />\n";
    		}
    		if ($key == "COMPUTED" & $name == "ApertureFNumber"){
        		$apertureExif = "Aperture: ".$val."<br />\n";
    		}
    		if ($key == "EXIF" & $name == "ISOSpeedRatings"){
        		$isoExif = "ISO: ".$val."<br />\n";
    		}
    	}
	}
	
	$customExif = $customExif.$cameraExif.$lensExif." at ".$flExif.$apertureExif.$shutterExif.$isoExif;
	
	if ($tripod == "yes") {
		$tripodExif = "Tripod: Benro A2691T Travel Angel with BH1 Ballhead<br /><br />\n";
	}
	if ($tripod == "no") {
		$tripodExif = "Tripod: Handheld<br /><br />\n";
	}
	$customExif = $customExif.$tripodExif;
	return $customExif;
}

add_shortcode('myexif', 'getExifCustom');
?>

Feel free to use this code if you want. You may need to modify it slowly if you camera has different EXIF data than mine. I recommend creating a single file called exifTest.php and placing the below code in it to see the EXIF data you photos have in them.

<?php

$exif = exif_read_data('http://path/to/image/file.jpg', 0, true);
foreach ($exif as $key => $section) {
    foreach ($section as $name => $val) {
        echo "$key.$name: $val<br />\n";
    }
}
?>

Managing Hashtags for Instagram Posts

The goal of all the social media we use daily is to get ourselves or our work recognized. The way we do this is by posting to various Social Networks utilizing hashtags to pick up the trends we want to be part of or Social Group we want to follow. I recently decided to give up my battle against social media and jump on the bandwagon and start posting photos to Instagram on a regular basis. It gives me a chance to get my work seen by so many people all over the world and also has given me the opportunities to meet new people as well. I don’t want to digress to much from the topic though so I an write up some of my benefits in another post.

Hashtags are great, as I said they are usually tied to either a trend or social group that people follow and below to. For photography there are endless amounts of hashtags to use for different locations, photography types, groups, styles etc. To keep track of all these can be cumbersome and also to get them easily accessible to use in a post can bit painful at times. When I started out I would keep them in groups in a Google Doc that I could copy and paste from which seems to work pretty well for me to start. As I start to post more frequently I wanted something that was a bit more easy to manager. I decided to use my phones Custom Dictonary to create auto corrects that would add in the needed hashtags based of a single word.

An example of what I created would:

If I type igtnyc, it will auto correct to #nyc #nyc #ig_nycity. So now when posting I dont have to worry about copying and pasting or even making a mistake when I enter tags. Once you create your first one you can just edit the auto correct when you want to add or remove hashtags from it. You can also create multiple auto correct entries to target the different type trend or group you want to target posts towards. For photography I have some I started like igttravel, igtlongexpo, igtwtc that each auto correct to the group of hashtags I have picked to target.

To implement this on a iPhone is pretty straightforward and can be done using the built in features. I use a Motorola Droid Turbo and found that the auto correct feature is limitted to a certain number of characters was able to find success using a third party app called User Dictionary Manager that let me add auto correct with many more characters than the base feature of the phone.

EXIF Shortcode for WordPress

I post mostly images on my site here and always like the share the camera, lens and settings information from my photos for everyone to see. I got tired or having to type the information over and over so I decided to write a shortcode for WordPress to handle most of the work for me. All you need is a function to perform the task at hand that returns data and a line to add the shortcode itself. For my function I start by pulling all the EXIF information from the photo and looping through each key/value pair to store the piece I want in a string and then return that string. The way my EXIF information was getting read needed a little bit of formatting to look the way I want and to say for the 4 for the Shutter Speed instead of 4/1 (how it was getting read). For my shortcode I decided to to call it [myexif]. I also wanted to show whether or not I used a tripod, since the information is not stored in the EXIF I made that an attribute of the shortcode to set a yes or no value.

Here is an example output of the shortcode:

Gear:
Camera: Canon EOS 5D Mark III
Lens: EF24-70mm f/2.8L II USM at 35mm
Aperture: f/2.8
Shutter Speed: 1/8000 of a second
ISO: 100
Tripod: Handheld


Here is how to use the shortcode in your post:

[myexif tripod="no"]http://localhost/allenserh_at/wp-content/uploads/2015/09/8Q4A5659-original-web.jpg[/myexif]

To setup the whole thing the following code was added to a file called shortcodes.php which I placed in the root of my theme folder and then used a include statement in the functions.php file to include shortcodes.php. This shortcodes.php file can also be packaged into a plugin which I may do so you don’t have to modify any existing code.

<?php
function getCustomExif($atts, $content = null) {
    $customExif = "<strong>Gear:</strong><br />\n";
    extract(shortcode_atts(array(
        "tripod" => 'yes'
    ), $atts));

    $exif = exif_read_data($content, 0, true);
    foreach ($exif as $key => $section) {
        foreach ($section as $name => $val) {
            if ($key == "IFD0" & $name == "Model"){
                $cameraExif = "Camera: ".$val."<br />\n";
            }
            if ($key == "EXIF" & $name == "UndefinedTag:0xA434"){
                $lensExif = "Lens: ".$val;
            }
            if ($key == "EXIF" & $name == "FocalLength"){
                $val = strstr($val, "/", true);
                $flExif = $val."mm<br />\n";
            }
            if ($key == "EXIF" & $name == "ExposureTime"){
              $valF = substr($val, 0, 1);
              $valS = substr($val, 1, 1);
              $valT = substr($val, 2, 1);
    			
              if($valF == "1" & $valS == "/"){
                  $shtrExif = "Shutter: ".$val." second<br />\n";
              }
              if($valF == "1" &  $valT == "1"){
                  $val = strstr($val, "/", true);
                  $shtrExif = "Shutter: ".$val." second<br />\n";
              }
              if($valF != "1"){
                  $val = strstr($val, "/", true);
                  $shtrExif = "Shutter: ".$val." seconds<br />\n";
              }     		
            }
            if ($key == "COMPUTED" & $name == "ApertureFNumber"){
                $apertureExif = "Aperture: ".$val."<br />\n";
            }
            if ($key == "EXIF" & $name == "ISOSpeedRatings"){
                $isoExif = "ISO: ".$val."<br />\n";
            }
    	}
    }
	
    $customExif = $customExif.$cameraExif.$lensExif." at ".$customExif.$flExif.$apertureExif.$shtrExif.$isoExif;
	
    if ($tripod == "yes") {
        $tripodExif = "Tripod: Tripod Name Here<br /><br />\n";
    }
    if ($tripod == "no") {
        $tripodExif = "Tripod: Handheld<br /><br />\n";
    }
    $customExif = $customExif.$tripodExif;
    return $customExif;
}

add_shortcode('myexif', 'getCustomExif');
?>

Feel free to use this code if you want. You may need to modify it slowly if you camera has different EXIF data than mine. I recommend creating a single file called exifTest.php and placing the below code in it to see the EXIF data you photos have in them.

<?php

$exif = exif_read_data('http://path/to/image/file.jpg', 0, true);
foreach ($exif as $key => $section) {
    foreach ($section as $name => $val) {
        echo "$key.$name: $val<br />\n";
    }
}
?>