Results 1 to 3 of 3

Thread: Stream Read Error because of LoadBitmap

  1. #1
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default Stream Read Error because of LoadBitmap

    In my map generation tools script I'm working on (check it out in 'other scripts' if you haven't seen it yet) I've run into a problem. When calling LoadBitmap, it crashes my script with the most peculiar thing about it being because of its size, or so it seems. When instructed to load a single tile (32 x 32 px) it loads it finea nd the editor works fine, but when loading a tile sheet (192 x 320 px) it crashes with 'Stream Read Error' coming up in the debug box. I've tried changing the name of the file, remaking it and even getting another one and using that instead, but it always seems to crash when using a 192 x 320 px bitmap (haven't tried other sizes, but I'm guessing it must be at around 40k px area). If anyone can help in any way, I'll be eternally grateful (though I usually sleep an eternity, so don't get your hopes up too high )
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  2. #2
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    have u used "Freebitmap" at all?

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  3. #3
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    I've used it a lot though only twice in that procedure and those were for other bitmaps. The bitmap TileSheet gets freed after the form finishes compiling the tools section, which is when it is last used.
    Edit: Here's the start of the procedure, though I doubt it will help solve the problem as there's nothing much there:
    SCAR Code:
    procedure AssembleMapBitmap;
    var
      l, x, y, Time, tmpBmp, Buffer: Integer;
      pos: TPoint;
    begin
      Time := GetSystemTime;
      Buffer := BitmapFromString(384, 384, '');
      FastDrawClear(Buffer, 0);
      Writeln('RAWR - ' + GfxFilePath + 'Tiles.bmp');
      TileSheet := LoadBitmap(GfxFilePath + 'Tiles.bmp');
    And GfxFilePath is a set string that definately points to the right place

    Edit2: Fixed it - for some reason photoshop saved it with a hidden file extension so Scar tried to read it and failed - saved it from Fireworks and it works. Best of all, with that done, the basic map editor is now done and working well, even with multiple layers
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How does LoadBitmap work?
    By groog in forum OSR Help
    Replies: 10
    Last Post: 08-02-2008, 05:11 PM
  2. Error? Read!
    By n3ss3s in forum News and General
    Replies: 3
    Last Post: 12-27-2007, 09:30 AM
  3. Replies: 5
    Last Post: 09-25-2007, 07:28 PM

Posting Permissions

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