You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to read/write BMP files, I tried to use CStruct5[...] for BITMAPFILEHEADER but read wrong values due to alignment.
There are workarounds of course (use a Ptr[Byte] then write some extension methods to access the fields by adding correct offsets manually, or use Scodec). But sure would be nice to have some "built-in" mechanism 😄
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
https://www.gnu.org/software/c-intro-and-ref/manual/html_node/Packed-Structures.html
Is it possible? Would be very nice to have 😄
I was trying to read/write BMP files, I tried to use
CStruct5[...]for BITMAPFILEHEADER but read wrong values due to alignment.There are workarounds of course (use a
Ptr[Byte]then write some extension methods to access the fields by adding correct offsets manually, or use Scodec). But sure would be nice to have some "built-in" mechanism 😄All reactions