Solved

Rotate base64 string/ gif before printing

Posted on 2014-03-12
2
1,038 Views
Last Modified: 2014-03-12
I'm using the UPS developer api to print shipping labels.
The label is returned in a Base64String.

I convert the Base64 to an image and then print the image with print document.

The image is sideways and needs to be rotated clockwise.

How should I go about doing that?
0
Comment
Question by:JRockFL
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39924950
Use the RotateFlip method of the Image class:

e.g.

byte[] imgData = Convert.FromBase64String("the base-64 string");
System.IO.MemoryStream ms = new System.IO.MemoryStream(imgData);

using (System.Drawing.Image img = System.Drawing.Image.FromStream(ms))
{
    img.RotateFlip(System.Drawing.RotateFlipType.Rotate90FlipNone);

    // print the image
}

Open in new window

0
 
LVL 8

Author Comment

by:JRockFL
ID: 39924964
Perfect! That worked. Now I can stop messing around.
Thank you.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question