|
-
Jan 24th, 2000, 11:05 AM
#1
Thread Starter
Member
This almost should go in Graphics and Games but it deals more with files.
Im attempting my very first graphical program using DirectX, and became settled i could read two bitmaps, and put them (using Put with a random i/o file) into another one, and be able to access them easily through one file, and it'd also work great for animations. When it came to coding this, needless to say it didn't work or i'd be a happy coder.
Now, if something is wrong with my *RAW FILE LOADING* please tell me:
Dim it As String
Open "c:\pic1.bmp" For Input As #1
Open "c:\temp.bmp" For Output As #2
While Not EOF(1)
Line Input #1, it
Print #2, it
Wend
Close #2
Close #1
(excuse the indent, Mozilla 5.0 doesn't allow it )
The two files above *DO NOT MATCH IN SIZE*. The original picture is 29k, the resulting is 21k. It works for anything but a bitmap (exe, txt, zip), 'cept i didnt try other picture formats for the sake of my sanity.
I want to be able to read two bitmaps, place them into a file, and access them such as:
Get #1,1,StillFrame
Get #1,2,WalkFrame1
Get #1,3,WalkFrame2
etc.
Now if anyone can come up with a better (and easy, im highly inexperienced with graphics programming) solution, i'd also appreciate it. Thanks in advance.
- Distressed Programmer
------------------
-Mystiq
[This message has been edited by mystiq (edited 01-24-2000).]
-
Jan 24th, 2000, 10:18 PM
#2
Frenzied Member
Is there a good reason why you can't use FileCopy() ?
and
you could put your bitmaps in a resource file...
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
-
Jan 25th, 2000, 07:56 AM
#3
Thread Starter
Member
Apparently you are not getting my purpose. I wouldn't FileCopy because that doesn't take two files and stick them into one. And how do you use Resource files? I never used em.
------------------
-Mystiq
-
Jan 27th, 2000, 04:50 PM
#4
Frenzied Member
I haven't forgotten about you!
It's probaby best to have a look at some samples
the sample program
C:\Program Files\DevStudio\VB\samples\PGuide\ATM\Atm.vbp
uses resource files
this is also at: http://msdn.microsoft.com/library/de...natmsamapp.htm
and this one: http://support.microsoft.com/support.../q194/4/09.asp
might be usefull as well!
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|