Android graphics is based on Skia - so the engine already does what the article 
suggests (as it too uses skia).

If your resizeQuality is set to normal, then it turns off skias filtering, if 
it is good then it uses skias filter (which I believe to be bilinear, based on 
looking at the code).

Mac was always a special case pre-cocoa in the engine - the QuickDraw call did 
some sort of filtering which wasn't it appears bilinear.

Now it may be that Peter's problem might be resolved by setting resize quality 
to good - which would be good.

If we could find an implementation of a similar algorithm that QuickDraw used 
(which does appear to produce a slightly better visual result for scaling 
certain types of image) then we could potentially plug it in as an alternative 
resampling algorithm - thus resurrecting that 'feature' for all platforms.

(Best resizeQuality uses a cubic interpolation filter which is generally better 
for scaling photorealistic images for an end result, for example, but it is too 
slow to be used on-the-fly so the engine precomputes and caches)

Sent from my iPhone

> On 19 May 2015, at 20:02, Terence Heaford <t.heaf...@icloud.com> wrote:
> 
> 
>> On 19 May 2015, at 17:34, Mark Waddingham <m...@livecode.com> wrote:
>> 
>> We're not entirely sure what algorithm CopyBits uses for scaling images 
>> which seems to be so good for certain image types - but if someone does 
>> know, and indeed has some suitably open / free source-code lying around 
>> which does something similar we could look to see if we could resurrect that 
>> kind of filtering (it does seem to be somewhat different from bilinear - I 
>> think it is some sort of 'box' filter, but that covers a fair few things).
> 
> 
> I presume you do not wish to use Cocoa but want to use Skia?
> 
> I have no knowledge of Skia but stumbled across this link that may be of 
> interest?
> 
> "How to scale images for your Android™ application” posted by Sony Mobile.
> 
> http://developer.sonymobile.com/2011/06/27/how-to-scale-images-for-your-android-application/
> 
> 
> All the best
> 
> Terry
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to