Fixing orientation of image/photo from devices

Camera phones these days store the orientation the phone was in when taking the photo and store the photo in the camera device layout.  So this means if your software dosn’t know to rotate the image it will appear rotated on screen.

Here is a simple extension method to fix the orientation when you load an image for display.

namespace System.Drawing
public static class ImageExtension
public static void FixOrientation(this Image image)
if (image.PropertyIdList.Contains(0x0112))
var objProperty = image.GetPropertyItem(0x0112);

switch (BitConverter.ToInt16(objProperty.Value, 0))
case 1: // landscape, do nothing

case 8: // rotated 90 right
image.RotateFlip(rotateFlipType: RotateFlipType.Rotate270FlipNone);

case 3: // bottoms up
image.RotateFlip(rotateFlipType: RotateFlipType.Rotate180FlipNone);

case 6: // rotated 90 left
image.RotateFlip(rotateFlipType: RotateFlipType.Rotate90FlipNone);

objProperty.Value = new byte[] { 0, 0 };




.NET, .NET Version 3.5, .NET Version 4 Comments Off

Avid Reader

I think all gamers and programmers live a life in there own mind.   Gamers like reacting without thought, programmers react with thought.

I have found reading stops this process with me.  I have wondered if other people are the same?  I have to read before I sleep so I can sleep, it switches off all the bits of my brain that keeps me awake.

So what I am getting to I became an avid reader!! of fantasy and science fiction. I am going to list authors I like and the *best* authors at the moment

Best Recent Authors (if you think someone else should be in here buy me the book!)

Brad Sanderson

Peter V. Brett

Terry Pratchett

Other Authors (have read them all)

C. J. Cherryh

Guy Gavriel Kay

Terry Brooks

Piers Anthony

Anne Rice


Misc, Uncategorized Comments Off

Fix the ribbon bar ALL CAPS casing on new microsoft applications automatically

Fix the casing on the ribbon bar for the following Microsoft applications automatically.

Download the batch file below and execute this on your system.  This will copy per-configured options files into the below applications.  If you don’t own the application don’t worry as these are tiny config files for each application.  (Feel free you check out the config folder in the download)

Access 2013
Excel 2013
InfoPath Designer 2013
InfoPath Filler 2013
OneNote 2013
Access 2013
Outlook 2013
PowerPoint 2013
Publisher 2013
Word 2013
Visual Studio 2012

Download ZIP Containing Batch File

Misc, Visual Studio 2012 , , , , Comments Off

Nokia Lumia 710 – Nokia Drive

Just tried nokia drive out for the first time, now having used the N97 navigation by nokia I knew what to expect.

The windows phone version they basically split the N97 App into 2 separate Apps Nokia Maps and Nokia Drive.

The drive App is nice and simple and easy to use.  Also it’s quite responsive but the 710’s GPS is a bit slow.  The only big problem with Nokia Drive is lack of routing options so you can’t turn off motorway navigation / toll roads / tunnels etc which of course we know they can do based on the N97 version. Hopefully these options will make it though soon in an update.

Windows Phone Comments Off

Visual Studio 2012 C++ Express is Losing Desktop Support

The title says it all really.  After years of good progress with the open source community’s Microsoft are taking a step backwards with this.  Hopefully they will change their mind before release.

Please vote for this support on this connect issue

Visual Studio, Visual Studio 2012 Comments Off

Windows Phone 7.5 on Nokia Lumia 710

I have been given a Nokia 710 by Microsoft to develop Apps on at my workplace.  I have swapped to using this as my main phone to get used to the OS before I design the Apps we are going to develop.  I previously used a Nokia N97 Symbian Phone, I love my qwerty keyboard :)

Bad Features

  • Battery – This is quite a joke I have to charge this everyday (I hope this is because its the lower end model).  My N97 lasted about 3 days on average or all week on standby.  On the windows phone I only have wireless on 27/7 on my N97 I had Bluetooth and Wireless on 24/7.  Email collection is set at 15min on both.  Also the N97 battery is 3 year old and it still is better :S
  • Touch screen keyboard – It’s better than my N97, but been the only option is should be great.  Main problem is it obscures everything on the screen more or less so can’t always get to the next data entry box on forms.
  • Changing Sounds – You can’t add your own sounds and can’t change some of them
  • Music Player
    • You can’t completely stop the play-list? To do this you need to install an app!!

Missing Feature

  • Sound Profiles – Allows quickly switching from Silent /Aeroplane / Meeting / General.  I use this feature a lot but now I have to go through menus
  • Flash in Web Browser- Well we aint going to see this anytime soon
  • Silverlight from Web Browser – Yes the N97 actually had this

Great Features

  • Publish to SkyDrive when taking a photo
  • SkyDrive App – Lets me manage my published content
  • Email and Messaging topic grouping – This is a great feature
  • Web browser – Nice and simple to use not had any problem on sites so far

Features that may exist but not found yet or not tried

  • Picture grouping by Month
  • Exchange Support
  • Multiple eMail boxes
  • Picture Editing
  • Document Viewing
Windows Phone Comments Off

Visual Studio 2012 RC

Well the release candidate is finally here.  So I think I am going to do the leap and upgrade to the release preview of windows 8 and get some metro work done.  I am seeing lots of pain ahead :S

Visual Studio Comments Off

Full Text is planned for Azure Table Storage

Well we’ve been waiting quite a while for this SQL Azure and Windows Azure have got a planned status for Full Text searching.

Now the question is where in the plan?  But generally the ideas site has been receiving plenty of updated from admin recently so I think Microsoft have realized we were all getting annoyed with the lack of feedback.   All we can hope is it’s soon :)

More info here

Azure Comments Off

FF XII-2: Fragments – Wild Fragment Locations

Bresha Ruins 005 AF

Reward for the Moogle Hunt tutorial quest

Sunleth Waterscape 300 AF

When riding on the back of the beast from north to south, look for it on the left side roughly halfway through the ride.
Oerba 200 AF On the ledge on the right side of the building north of the large tree (the tree in the middle of the road between buildings). Throw Mog to get to obtain it.

Serendipity ??? AF

Purchase for 10,000 casino coins or 7,500 if you have the Bargain Hunter fragment skill.

The Archylte Steppe ??? AF

The very far west side of the map, in the Clearwater Marshes, is a ledge with this artefact. Have the camera looking down as you look along edge to see the ledge below – it can be easy to miss if you’re not looking for it. Throw Mog down there to get it. Try to aim for hitting it or Mog might bounce over the edge. (see below for how to reach this area)

Bresha Ruins 300 AF

Obtained from the Iridium Ring quest. Use Moogle Hunt on the red silhouette of the man walking around in the cemetery. He will give you the quest.

Augusta Tower 200 AF

Look to the north of the middle ring of floor 50 (not the side with the sphere). Walk over or throw Mog to obtain.
Yaschas Massif 100 AF Complete the red orb quests until a temporal rift appears on the ground near the statue/face. Resolve the anomaly by completing all the clock puzzles and you’ll receive the artefact.

Academia 4XX AF

Find Chocolina on the east side of Academia. Directly south of her is a back alley area. There’s nothing really notable about the place except for a sphere on a very short flight of steps, so it’s easy to miss. Best route is to find Chocolina near the gate then take the flight of steps to the east of her then immediately take the blue walkway. Take an immediate left into a back alley area (the music will change once you walk down the steps here). Go straight until you can turn left. You’ll find the artefact near some boxes where the ground changes from black and copper to gray. Use Moogle Hunt to obtain.

A Dying World 700 AF

After you rescue Noel, return to the place where he last saw Yeul in his nightmare. During the Live Trigger, answer with, “I can do this” for the artefact to appear.

Final Fantasy Series, Games Comments Off

FF XIII-2: Fragments – The Void Beyond (??? AF)

Etro’s Sorrow

Speak to Yeul as part of main storyline

Pulse’s Resolution

Speak to Yeul as part of main storyline

Lindzei’s Desire

Speak to Yeul as part of main storyline.

Mwynn’s Tenderness

Speak to Yeul as part of main storyline.

Bhunivelze’s Sleep

Speak to Yeul as part of main storyline.

Final Fantasy Series, Games Comments Off