Can the result of SKData.Encode() may vary between different Windows machines? #3225
Unanswered
jakubkirylo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have an application which imports pdf files. There is a lot of things going during the process but long story short - images from pdf files are read, encoded to Png and then saved as bmp on local storage.
There are some unit tests in place, where I keep the "reference" bitmap and compare it to the result of the import process of specific file.
I have my own StreamComparer in place which reads both encoded bmp streams into byte arrays in chunks and compares each byte sequentially.
Even though both machines use identical SkiaSharp versions, .Net SKD, C++ redistribuables, same code, same pdf file, etc., the resulting encoded streams differ slightly. For example, a byte at the same position in the stream might have value 250 on one machine and 255 on the other.
Could you explain what might cause SKImage.Encode() to produce slightly different PNG outputs (binary-wise) given identical input data? Are there machine-specific factors (hardware acceleration, CPU instructions, system color profiles) that could affect the PNG encoding output?
Beta Was this translation helpful? Give feedback.
All reactions