@thomthom said:
@soldatino said:
Yes, 0xFF, 0xD9
D9 ? - from what I find ont he JPEG format it's D8... ??
@soldatino said:
and (transforming always in lowcase) "tp:","j" and
what are you transforming to lower case? Isn't this something you should compare on a byte level?
@soldatino said:
The start point of the name of the default textures, because it have not "" before. I must to write a filenames table...
But due the garbage the scan has not 100% certainty.
Are you looking for more than just the JPEG data? Are you also trying to get the texture filename?
Getting just the JPEG data extracted should be possible to reliably do - but if you're trying to get other meta data out of the .skp, that might be more troublesome - depending on what you try to extract.
I apologize, my english is bad.
0xFF, 0xD8 are the bytes at the start of the file, that continues with some bytes including "j" and "if" for sure, but h-l case depending by the editor that generated the jpg.
0xFF, 0xD9 are the last bytes of the file and are important because I don't know the filesize.
After these bytes, SU writes a information block, where the presence of slashes and ".jpg" string means that the jpg original file was in the PC of the creator, differently, if they are not and you find "tp:" the file was downloaded from the web, and there is a url instead of a filename. If you find nothing and only ".jpg", the file is a SU texture in his folder.
Warning : the "name" is written n+chr$(0)+a+chr$(0)+m+chr$(0)+e+chr$(0)+. ......etc
Thank Tig and ThomThom for the infos, I will search for the API also.