LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-06-2004, 06:26 PM   #1
dizzutch
Member
 
Registered: Sep 2004
Location: Worcester, MA USA
Distribution: Debian, Gentoo, Fedora FC2
Posts: 66

Rep: Reputation: 15
strange file creation problem


Hey all,
I'm trying to do some manipulation to bitmaps, which works fine, but when i try to export the created bitmap to disk, say to file morph000.bmp the file created will be morph000.bmpi? (including the questionmark) I'm really not sure what causes this error.
any ideas are appreciated.
Thanks!
-JSS

Code:
    if (disk_save)  {
      filename = (char*)malloc(10*sizeof(char));
      sprintf(filename,"morph%03d.bmp", t);
      SaveDIBitmap(filename, Bitmap1Info,  buffer[t]);
    }
SaveDIBitmap()
Code:
 if ((fp = fopen(filename, "wb")) == NULL)
        return (-1);
  ...
  fclose(fp)
 
Old 10-06-2004, 06:30 PM   #2
dizzutch
Member
 
Registered: Sep 2004
Location: Worcester, MA USA
Distribution: Debian, Gentoo, Fedora FC2
Posts: 66

Original Poster
Rep: Reputation: 15
never mind, not allocating enough space..duh

-JSS
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange vsftpd problem concerning file transfer 0p3r4 Linux - General 2 11-24-2005 01:26 AM
Core file creation problem on ramdisk system hasse69 Linux - General 1 05-12-2005 04:06 PM
php read file creation, modified date problem antony_csf Programming 3 08-18-2004 07:46 AM
Apache File Permission Strange Problem hcubed Linux - Networking 1 05-15-2004 02:09 AM
RPM Spec file creation: %file section question davidas Linux - Newbie 0 03-16-2004 11:36 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration