1.) Anybody ever got this working? I do have the up-todate CatchImage library and it works great with BMPs, but how do we catch JPGs and PNGs? When I tried (using the jpeg decoder before hand), w/ #PB_ANY, it returns a valid image number, but no valid image (it's all black).
2.) Is there a way to tell if the resulting image from catch image (used with vbin) is a NULL? The program always errors out if it returnsd a NULL, and I think it would be quite helpfull to find out if a image is null'd or not gracefully. w/o having to list the entire contents of a packed file (as packed files can be huge).
3.) I have asked this of Paul via PM, but he never answered, so I am going to ask here... If you look at the VBIn maker, it returns both compressed and uncompressed size of a packed file, yet there are no functions in the library to find the compressed size of a packed file. However, his program DOES show such a thing. Anybody know how to do this?
Virtual Bin w/ CatchImage w/ Non-BMPs? + NULL! + More!
1. You didn't supply any code so I can't say what you are doing wrong... but it works fine here using both Constants and #PB_Any. Here's an example:
http://www.reelmedia.org/test/vtest.zip
2. You're the one who created the VBin, you're suppose to know what files are in it and what the proper names are
Anyway, if you want to test for problems then do a check first. VBin returns 0 if it fails...
3. There is no function in the library to return compressed size because there was never a need for it (unless your using the library to make a ZIP clone?) To extract data from a VBin the most you would ever need is the original file size. If I ever get some free time I could try and add that feature if it's really nessesary.
http://www.reelmedia.org/test/vtest.zip
2. You're the one who created the VBin, you're suppose to know what files are in it and what the proper names are
Anyway, if you want to test for problems then do a check first. VBin returns 0 if it fails...
Code: Select all
result=VBin("vtest.bin","badfilename.bmp","")
If result
image=CatchImage(#PB_Any,result)
Else
MessageRequester("Error","Error Loading File")
EndIf- DoubleDutch
- Addict

- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
I reckon (from this and your other posts) that either your installation of PureBasic is corrupted somehow, your gfx card is faulty, or maybe the Windows installation is corrupt? Try your (compiled) program on another machine - if it works as expected then you know that its not your programming - but something restricted to the runtime enviroment of your machine.
Hope this helps...
-Anthony
Hope this helps...
-Anthony
Well, almost all of my other post problems have been fixed. Except for the SendNetworkString bug, and the server side issue. But everything else works now for some odd reason
I have two dev machines at home (both XP unfortunately), and I test with both of them.
Forgot to post the code last night while home, havent been much on the computer due to lovely kids. Will try tonight.
Forgot to post the code last night while home, havent been much on the computer due to lovely kids. Will try tonight.


