A bit of a redirection but same vicinity of my last post.
Part 1 - Creator program
I writing a binary file out with data plus at the end of some file writes a graphic is also written out. I load a picture (jpeg/png) using Xojo’s ClipArt = f.OpenAsPicture but save it out in the combo data file using PictureToJPEGStringMBS
Part 2 Player Program
In the player program the user can open the above file fine and once they start playing and they save their progress it becomes a player file with a different extension so that it is only associated to the player program. At this point it is saved similar to Part 1 which all seems fine until I load the game file back in but the graphic doesn’t show.
When I check while debugging the graphic data seems to be loading JPEGtoSTRINGMBS won’t convert the bytes to picture yet it did so fine when loading from the creator.
All sounds very confusing but finally a question or two
- When reading a binary file if you attempt to read and there is no more data what happens?
- the byte size of the picture seems to be different when read in to what is written out in subsequent saves why would this be?
Below example has some of the load save code