Create Tiff File from String

Posted on 2008-11-18
Last Modified: 2013-11-27
I need to create a tiff file from a string.   I was give the following code but i receive a run time error when i try to execute it.   I am using 2005.

 Dim newBitMap As New Bitmap("C:\mergeddocs\test.tif")
                        Dim Grp As Graphics = Graphics.FromImage(newBitMap)
                        Grp.DrawString("Hi world", Me.Font, Brushes.Black, 2, 2)
I get parameter is not valid on the first dim statement.   Can anyone help or give another simple example that would create a tiff from a string file  

Question by:PSERS
    1 Comment
    LVL 25

    Accepted Solution

    Dim newBitMap As New Bitmap(desiredWidth, desiredHeight)
                            Dim Grp As Graphics = Graphics.FromImage(newBitMap)
                            Grp.DrawString("Hi world", Me.Font, Brushes.Black, 2, 2)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
    In my previous article ( we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now