+ Reply to Thread
Results 1 to 2 of 2

Creating a .bmp file with Put statement

  1. #1
    Registered User
    Join Date
    03-16-2004
    Location
    UK
    MS-Off Ver
    2003
    Posts
    85

    Creating a .bmp file with Put statement

    I am trying to craete a bmp file programatically. (It is for a GIS style application in excel where I can make full use of the colour pallate and use a very large grid. I've explored charting options and shape objects but they have limitation. This will be a much better solution).

    Here some of my test code to create a bmp. I cribbed it from an example and changed some of the header parameters and the pixels to try and craete a picture with random dots. It kind of works in that it doesnt crash and creates a file with all the correct bytes in as far as I can tell (I read them back in and compare them with another bmp).

    When I actually open the file it is just black with dimensions 1392x1040 pixels. Not what I've specified.

    Any suggestion on what I'm getting wrong?

    Here's the code.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Phil

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Creating a .bmp file with Put statement

    The attachment may help for debugging purposes -- it reads bmp headers, and will plot the picture and the RGB values (within the limits of Excel 2003's 256 columns) for uncompressed bmps with 24-bit color.

    Please don't look closely at the code -- it's oooold.
    Attached Images Attached Images
    Attached Files Attached Files
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1