|
Post by scalion on Apr 10, 2018 9:31:21 GMT 1
Hello, i seen there somebody need to load PNG picture in gb32 and display it. Now you can do that with my little demo using zlib32.dll, and alpha channel is supported . Hope that help you. ChargerPng.zip (772.23 KB)
|
|
|
Post by wbtcpip on Apr 10, 2018 10:12:31 GMT 1
good demo ...thank you
|
|
|
Post by Emil_halim on Apr 23, 2018 15:13:59 GMT 1
Hi
when run your demo , i got a full size window and there is no picture appear at all.
also a MessageBox appear telling me that End of file Reached.
so any help please?
BTW , my system is , window 10 intel i core 5.
|
|
|
Post by Emil_halim on Apr 25, 2018 8:20:30 GMT 1
Hay , sny body here....
really i need to know where is the issue ?
, thanks
|
|
|
Post by scalion on Apr 25, 2018 21:16:34 GMT 1
Hi, I have win10 and icore5 too and that's work fine... Maybe a problem with the includeds files ? In first, have you modified something ? In doubt try to re-extract the g32 file... On wich line is the cursor in GFA Editor after error message ? Try to disable your GfaExtensions to see what happen. Tell me more about your problem, i will parse.
|
|
|
Post by Emil_halim on Apr 26, 2018 15:16:23 GMT 1
Hi first of all , thank for your respond. I think ,it is not included files , because i changed like this 'fic$ = ":Papillon.png"
' To open your personnals pictures replace previous line by this next :
FileSelect "*.PNG", "", fic$ so i can select a file by myself. This is only what i modify ,when it does not work. re-extracting done , the same problem. did not allowed my Extension. here is a screen shot that what i can tell you Attachments:
|
|
|
Post by scalion on Apr 26, 2018 20:18:06 GMT 1
Ok, I know this problem. Certains programs, like paint 3d for example, use a specific PNG format not described in the RFC1950 concerning Zlib or PNG Specification 1.2. Can you put your PNG file in your next reply and i will try to adapt my function. The only problem is that if the unexpected is in the compression format used I may not be able to do anything. In this case I advise you to open your PNG file in an old PhotoFiltre 7 style program and have it "save as" in the standard PNG format. This should solve the problem, (until I find a solution of course), It will solve the problem but I'm sure it's not really the answer you expect.
Thank you for the print-screen but we do not see the line where the program stopped. It does not matter, I'll see when I have the PNG file you use.
Thank you for your interest in my work. Good evening, see you next time.
|
|
|
Post by Emil_halim on Apr 27, 2018 11:15:05 GMT 1
Thanks Nicolas,
The Image i used is your Reversi\Textures\ascii.png file in your Reversi Game.
Actually , my goal is to collect a useful snippet in a lib folder of my Extension , so that all of use can reuse this code easily , see me next Demo in GFA Basic Extension.
so i am tiring that putting the your png_loader procedures in a PNGLoder.lib in GFA Ext lib.
any way , really i appreciated your help , Keep up your cool demos, i think that my Extension will help you a lot.
|
|
|
Post by scalion on Apr 28, 2018 21:34:18 GMT 1
Hi, Sorry but i tried with the ascii.png and... that's work. (why ) Very strange...really weird... I tried both many png and that's worked too. But i know i tried at the time i created this feature there's certain PNG dont work. Since then I have not been able to reproduce this loading problem !!! I can't help you for this time And that annoys me greatly. Have courage, good luck. If you manage to solve this problem of "end of file reached" I thank you for posting a small message.
|
|
|
Post by Emil_halim on Apr 29, 2018 15:32:55 GMT 1
No problem , thanks you for your help.
I will post if i found a solution.
|
|
|
Post by scalion on Dec 9, 2018 22:40:44 GMT 1
Now i know the solution of your problem :
I dont seem before... sorry. You dont change the ":moi.png" too and it's a ressource included file. You use the version of GFA-Basic who dont use EOF in ":File".
The New version of GFA-BAsic will correcting this bug.
What i found : In earlier versions, EOF() didn't work correctly with text files as "internal resource files" (those files that are included in the source code and which name begins with ":"): EOF() was true after reading the first line even if there are many more text-lines in the "internal resource file" (it is the required function of TextEOF to test for an end-of-text marker, not EOF). As of gfawin23.ocx version 2.341, this issue has been fixed. The only workaround for this old error was to set up a Try...Catch structure around the file processing and use this in conjunction with the 'End of File reached' error message to emulate the function of EOF.
|
|