Specifically, say i have scaleX and scaleY being 0.5 or 0.25 (i.e. reducing image 2x or 4x). Will each of the new pixels be a kind of "average" (bi-linear or bi-cubic interpolation over 4 or 16 pixels respectively) - or will it pick a single pixel (nearest-neighbour)?
"Komag" wrote:That occurred to me but will be unreliable, since depending on the model, different (>1) graphic engines are used. And even if i tested on every model in existence, results may be valid only in this point of time, today.
You could set up an original image that is every other line red and green, and see what happens!
And maybe SetScaleMode(mode as Integer) changes it to one vs the otherYou mean ifRegion.SetScaleMode()? I am not using roRegions, so not directly applicable but thanks for letting me know about its existence. Looking at the folksy description
"SetScaleMode(mode as Integer) as Void" wrote:now i wonder (question #2):
Set the scaling mode used for DrawScaledObject
- 0 = fast scaling operation (may have jaggies)
- 1 = smooth scaling operation (may be slow)
You mean ifRegion.SetScaleMode()? I am not using roRegions, so not directly applicable but thanks for letting me know about its existence. Looking at the folksy description
now i wonder (question #2):
Is it trying to say that 0 does nearest-neighbor and 1 does bilinear interpolation?
(Source for my speculation, the unrelated ifTextureRequest.SetScaleMode)
Note that to use SetScaleMode, you set it on the target region, not the source. Even if you're not drawing to a specific region of your target, you can still wrap the whole bitmap in a region to take advantage of the scale modes (also applies to roScreen): ...
Do you have observations about performance penalty from extra wrapping a bitmap in a region? (ballpark. are we talking 0.3%, 3%, 30% etc)