Re: webP and webM support in LiveCode

2017-08-25 Thread Bob Sneidar via use-livecode
NVM you are talking about the compression ratio. 

Bob S


> On Aug 25, 2017, at 12:12 , Alejandro Tejada via use-livecode 
>  wrote:
> 
> WebP compress flat color graphics (with transparency)
> much better than PNG or GIF.
> 
> This is not a guess based on visual comparisons.


___
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


Re: webP and webM support in LiveCode

2017-08-25 Thread Bob Sneidar via use-livecode
I thought PNG is lossless. How can the image be better than the original??

Bob S


> On Aug 25, 2017, at 12:12 , Alejandro Tejada via use-livecode 
>  wrote:
> 
> WebP compress flat color graphics (with transparency)
> much better than PNG or GIF.
> 
> This is not a guess based on visual comparisons.


___
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


webP and webM support in LiveCode

2017-08-25 Thread Alejandro Tejada via use-livecode
I forgot a very important aspect of implementing webP in LiveCode engine.

For a first implementation, LiveCode could import (decode) only static -not
animated- webP images and exclude the option of exporting images as webP
(excluding the encoder from the engine). This would reduce the complexity
of this task.

Now, I have to check if these optimized JPG and PNG encoders produce better
results with my own test images:

https://github.com/google/guetzli/releases

https://github.com/google/zopfli
https://github.com/subzey/zopfli-png

Anyone interested in the topic of image optimization could learn a lot from
this webpage too:

https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/image-optimization

Have a nice weekend!

Al
___
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


Re: Search Values of Array in "One Go"

2017-08-25 Thread Mark Waddingham via use-livecode

On 2017-08-23 17:24, Sannyasin Brahmanathaswami via use-livecode wrote:

We use these arrays with media metadata that is extracted from our
database of media metadata. The dbase was originally designed for lots
of columns so that "there is nothing we cannot know about a media
item" incorporating DCIM columns and also W3C media metadata
initiative's recommended properties.  In actually usage for any give
media item only a small subset of columns containe any data. but we do
use almost all the columns at one time or another.  There are no
blobs, so this is very light weight data.

Anyway… this results in arrays which contain 1 top level key per
record and that element contains another 40 or so keys for the columns
of the database. most of which are empty/unused. So these arrays are
never "heavy" in terms of bytes.


I think you may have already found a solution to what you want to do... 
However, you'll find my version below.


The arrayFindElementsContainingString command is a generic handler which 
will search all elements of an array recursively for containing pNeedle.


It returns a sequence (numerically indexed array) of array paths 
containing the needle.


The handler exploits the 'dynamic path' lookup feature of arrays. If you 
construct a sequence (numerically keyed array starting at 1) array of 
strings, you can use that sequence in [ ... ], and the engine will treat 
it as a sequence of keys. e.g.


  put "foo" into tPath[1]
  put "baz" into tPath[2]
  put tArrayA[tPath] into field "Result"

Here the last line is equivalent to tArrayA["foo"]["baz"].

(Note this all works on arrays and strings, the test handler uses Json 
as a convenient way to represent an array in a field!)


 TEST HANDLER
-- Requires a field "Results"
-- Requires a field "Json" containing the JSON form of the array to be 
searched

-- Requires a field "Needle" containing the string to search for
-- Requires a field "Results"

/* Test the array finding */
command testArrayFind pNeedle
   /* Clear the results field */
   put empty into field "Results"

   /* Get an array which is JSON encoded in field "Json" as an array */
   local tArray
   put JSONImport(field "Json") into tArray

   /* Search the array for the needle, fetched from field "Needle" */
   arrayFindElementsContainingString tArray, field "Needle"

   /* Iterate over each found path */
   repeat for each element tFoundPath in it
  /* Each path is a numerically keyed array (sequence), these can be 
used
  * directly as array indicies, the engine will iterate through the 
elements of

  * the sequence to get the keys to use */
  local tValue
  put tArray[tFoundPath] into tValue

  /* Create a slash delimited list of keys (note - this won't work 
if any of the

  * keys in the path contain '/'!). */
  combine tFoundPath with "/"

  /* Show the list of results in field "Results" in the form:
  * slash delimited path : value
  */
  put tFoundPath & ":" & tValue & return after field "Results"
   end repeat
end testArrayFind

 LIBRARY FUNCTIONALITY

/* Search all elements of pArray for containment of pNeedle. The
 * command returns a numerically keyed array in 'it', each element of
 * which is an array path to an element containing pNeedle. */
command arrayFindElementsContainingString pArray, pNeedle
   /* We expect an array for pArray */
   if pArray is not an array and pArray is not empty then
  throw "pArray must be an array"
   end if

   /* We expect a string for pNeedle */
   if pNeedle is an array then
  throw "pNeedle must be a string"
   end if

   /* As arrays are recursive, we pass through the current base path
* for the sub-array being searched to an auxillary private command 
*/

   local tBasePath
   put empty into tBasePath

   /* The auxillary private command accumulates complete paths in
* tPaths, which is a numerically keyed array (sequence). */
   local tPaths
   put empty into tPaths
   _arrayFindElementsContainingString pArray, pNeedle, tBasePath, tPaths

   /* Using 'return for value' returns the value in 'it' in the caller. 
*/

   return tPaths for value
end arrayFindElementsContainingString

private command _arrayFindElementsContainingString pArray, pNeedle, 
pBasePath, @xFoundPaths

   repeat for each key tKey in pArray
  /* Fetch the value of the key */
  local tElement
  put pArray[tKey] into tElement

  /* Create a new path from the base path by appending the current 
key */

  local tPath
  put pBasePath into tPath
  put tKey into tPath[the number of elements in tPath + 1]

  /* What we do depends on the content of the element */
  if tElement is an array then
 /* If the element is an array, then we recurse passing through 
the path to this key

  * as the base path */
 _arrayFindElementsContainingString tElement, pNeedle, tPath, 
xFoundPaths

  else if tElement contains pNeedle then
 /* If the 

Re: Little OT: PHP script needed

2017-08-25 Thread Klaus major-k via use-livecode
Hi all,

we have found someone, thanks for all responses!

> Am 24.08.2017 um 14:28 schrieb Klaus major-k via use-livecode 
> :
> 
> Hi friends,
> 
> sorry for posting this to this list, but it is a bit of an emergency...
> Anyone available for writing a little PHP script I can post things to?
> Requirements for the script, it needs to:
> ...
> Thank you for your attention. 
> 
> 
> Best
> 
> Klaus

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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


Re: Search Values of Array in "One Go"

2017-08-25 Thread Sannyasin Brahmanathaswami via use-livecode
OK I will bite 

what would an array representing an "AND/OR" 
style query look like such that if used as a predicate 

for

 else if tElement contains pNeedle then

it would return true/false

How would you have to construct "tElement"

??



Mark: In terms of generalizing that function - then the key line which checks
whether an element matches is:

 else if tElement contains pNeedle then


One could imagine that this could be an arbitrary predicate - pNeedle 
doesn't have to be a string, so could be an array representing a AND / 
OR style query; or could be a regex (in which case you'd use matchText).

___
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


Adjusting browser widget contents for the keyboard in android

2017-08-25 Thread Jonathan Lynch via use-livecode
Has anyone had success with this? I have tried many suggestions from stack 
overflow and other sites with no luck.

On an iPad this happens automatically. Not at all on android.

Sent from my iPhone
___
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


Re: Search Values of Array in "One Go"

2017-08-25 Thread Brian Milby via use-livecode
I created a stack to do some testing to see about making a function that
could do multiple types of tests.  What I found was that adding another if
at that point added about 6% to the search time and a second level (else
if) added another 10% (16% total).  (I added a parameter for search type -
"String".  I used "String2" to get a second option, but used the same
test).  When I used number instead of strings it was a little lower, but
not much (5.5% and 11% total)


> In terms of generalizing that function - then the key line which checks
> whether an element matches is:
>
> else if tElement contains pNeedle then
>
> One could imagine that this could be an arbitrary predicate - pNeedle
> doesn't have to be a string, so could be an array representing a AND / OR
> style query; or could be a regex (in which case you'd use matchText).
>
> Warmest Regards,
>
> Mark.
>
> --
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
>
___
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


Re: Search Values of Array in "One Go"

2017-08-25 Thread Brian Milby via use-livecode
tElement isn't the part that would change (you are still searching against
a single value in the array), you would need to modify the comparison to
allow for pNeedle to contain multiple values and the operators.  It would
probably be easier to modify to use a RegEx.  If you have 2 comma separated
items, you could use something like the following (I'm sure the more
experienced can offer much better ways though):

*if* (tElement contains item 1 of pNeedle) or (tElement contains item 2 of
pNeedle) *then*

On Fri, Aug 25, 2017 at 10:41 PM, Sannyasin Brahmanathaswami via
use-livecode  wrote:

> OK I will bite
>
> what would an array representing an "AND/OR"
> style query look like such that if used as a predicate
>
> for
>
>  else if tElement contains pNeedle then
>
> it would return true/false
>
> How would you have to construct "tElement"
>
> ??
>
>
>
> Mark: In terms of generalizing that function - then the key line which
> checks
> whether an element matches is:
>
>  else if tElement contains pNeedle then
>
>
> One could imagine that this could be an arbitrary predicate - pNeedle
> doesn't have to be a string, so could be an array representing a AND /
> OR style query; or could be a regex (in which case you'd use
> matchText).
>
> ___
> 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


can't play h.264 on some windows machines

2017-08-25 Thread Tiemo Hollmann TB via use-livecode
Hello,

for the video guys amongst you.

As we know windows can't play h.264 mp4 videos with the old by LC used
directShow API natively. You have to install additionally mp4 filters. I am
using the LAV filters in my projects, which usually work fine and the mp4
videos can be played from my LC 8.1.4 programs fine.

But from time to time, I have a customer, who can't play my  videos in my LC
program on his windows 8.1 or windows 10 computers, though the LAV setup was
successful, at least without errors. And without videos my programs are not
usable. I couldn't find any solution yet for those customers and didn't see
any common factor of the affected machines.

I don't want wo change the h.264 codec, since it runs fine on most of the
machines and yes, we tested without antivirus enabled. Since I can't
reproduce the issue on any of my machines, it is very hard to drill it down.

Has anybody experienced similar problems with mp4 videos on windows and has
found the critical issue or missing link?

Thanks for sharing

Tiemo

 

 

___
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


HTML5 - Playing Audio files tutorial?

2017-08-25 Thread JOHN PATTEN via use-livecode
Hi All,

I have followed the tutorial here on playing audio files, 
http://lessons.livecode.com/m/4071/l/742506-how-do-i-play-sound-files-in-html5 


I have tried with both a wav file, and a m4a.  Neither of them seem to play.

Do I have to “include" the file in the Standalone Settings configuration panel, 
or can I just add it to my HTML5 project folder?

Also, the audio tag,
  

  

...that can go right before the ending /body tag?


Thank you!


___
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

Re: Search Values of Array in "One Go"

2017-08-25 Thread Sannyasin Brahmanathaswami via use-livecode
@ Mark Waddingham

Awesome! thanks, I will test this later… 

Yes, my solution, at the urging of our Cohorts of the Round Table LiveCode Data 
Diggers, 
who earlier said "Don't go looking for your needles in arrays." (

I just reformulated the SQL quaryand passed it back "up" to the stack script 
which fetched the original complete data set.
That worked, but there are many use cases where this will be a better solution.

in the context of songs  I guess we iterate several times through this example 
to a case where


[title %like% "laughter" OR subtitle %like% "laughter" OR description %like% 
"laughter" 

AND

genre = "Songs By Nerds"

AND

theme = "Never Say Can't"


requires three trips to the mall:

array contains "Laughter"  
  AND
array contains " Songs By Nerds "  
  AND
array contains "Never Say Can't"  

But these are very small data sets, relatively speaking.. so it will be fast.  
But what serialization results is unclear… 




 

On 8/24/17, 11:03 PM, "use-livecode on behalf of Mark Waddingham via 
use-livecode"  wrote:

I think you may have already found a solution to what you want to do... 
However, you'll find my version below.

The arrayFindElementsContainingString command is a generic handler which 
will search all elements of an array recursively for containing pNeedle.

It returns a sequence (numerically indexed array) of array paths 
containing the needle.

The handler exploits the 'dynamic path' lookup feature of arrays. If you 
construct a sequence (numerically keyed array starting at 1) array of 
strings, you can use that sequence in [ ... ], and the engine will treat 
it as a sequence of keys. e.g.

   put "foo" into tPath[1]
   put "baz" into tPath[2]
   put tArrayA[tPath] into field "Result"

Here the last line is equivalent to tArrayA["foo"]["baz"].

(Note this all works on arrays and strings, the test handler uses Json 
as a convenient way to represent an array in a field!)

 TEST HANDLER
-- Requires a field "Results"
-- Requires a field "Json" containing the JSON form of the array to be 
searched
-- Requires a field "Needle" containing the string to search for
-- Requires a field "Results"

/* Test the array finding */
command testArrayFind pNeedle
/* Clear the results field */
put empty into field "Results"

/* Get an array which is JSON encoded in field "Json" as an array */
local tArray
put JSONImport(field "Json") into tArray

/* Search the array for the needle, fetched from field "Needle" */
arrayFindElementsContainingString tArray, field "Needle"

/* Iterate over each found path */
repeat for each element tFoundPath in it
   /* Each path is a numerically keyed array (sequence), these can be 
used
   * directly as array indicies, the engine will iterate through the 
elements of
   * the sequence to get the keys to use */
   local tValue
   put tArray[tFoundPath] into tValue

   /* Create a slash delimited list of keys (note - this won't work 
if any of the
   * keys in the path contain '/'!). */
   combine tFoundPath with "/"

   /* Show the list of results in field "Results" in the form:
   * slash delimited path : value
   */
   put tFoundPath & ":" & tValue & return after field "Results"
end repeat
end testArrayFind

 LIBRARY FUNCTIONALITY

/* Search all elements of pArray for containment of pNeedle. The
  * command returns a numerically keyed array in 'it', each element of
  * which is an array path to an element containing pNeedle. */
command arrayFindElementsContainingString pArray, pNeedle
/* We expect an array for pArray */
if pArray is not an array and pArray is not empty then
   throw "pArray must be an array"
end if

/* We expect a string for pNeedle */
if pNeedle is an array then
   throw "pNeedle must be a string"
end if

/* As arrays are recursive, we pass through the current base path
 * for the sub-array being searched to an auxillary private command 
*/
local tBasePath
put empty into tBasePath

/* The auxillary private command accumulates complete paths in
 * tPaths, which is a numerically keyed array (sequence). */
local tPaths
put empty into tPaths
_arrayFindElementsContainingString pArray, pNeedle, tBasePath, tPaths

/* Using 'return for value' returns the value in 'it' in the caller. 
*/
return tPaths for value
end arrayFindElementsContainingString

private command _arrayFindElementsContainingString pArray, 

Re: Search Values of Array in "One Go"

2017-08-25 Thread Mark Waddingham via use-livecode

On 2017-08-25 17:43, Sannyasin Brahmanathaswami via use-livecode wrote:

@ Mark Waddingham

Awesome! thanks, I will test this later…

Yes, my solution, at the urging of our Cohorts of the Round Table
LiveCode Data Diggers,
who earlier said "Don't go looking for your needles in arrays." (

I just reformulated the SQL quaryand passed it back "up" to the stack
script which fetched the original complete data set.
That worked, but there are many use cases where this will be a better 
solution.


in the context of songs  I guess we iterate several times through this
example to a case where


[title %like% "laughter" OR subtitle %like% "laughter" OR description
%like% "laughter"

AND

genre = "Songs By Nerds"

AND

theme = "Never Say Can't"


requires three trips to the mall:

array contains "Laughter"
  AND
array contains " Songs By Nerds "
  AND
array contains "Never Say Can't"

But these are very small data sets, relatively speaking.. so it will
be fast.  But what serialization results is unclear…


Which is better (using arrays, or the DB direct) largely depends on the 
size of the dataset.


If you have a very large dataset, then you are going to run out of 
memory if you try and load it all into RAM - so a better approach (as 
you have done) is to bind the search to SQL queries on the DB. This is 
very scalable; and if you back everything you do with the (large) 
dataset by the DB, you get 'only needing what you need in RAM at any one 
time' essentially for 'free' (although, at the expense of needing to 
abstract through SQL I suppose).


If you have a small dataset (which isn't going to grow, or only grow 
very slowly) then it probably makes no difference, and you are better 
off using whichever is easier to code.


In terms of generalizing that function - then the key line which checks 
whether an element matches is:


else if tElement contains pNeedle then

One could imagine that this could be an arbitrary predicate - pNeedle 
doesn't have to be a string, so could be an array representing a AND / 
OR style query; or could be a regex (in which case you'd use matchText).


Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
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

Re: HTML5 - Playing Audio files tutorial?

2017-08-25 Thread Colin Holgate via use-livecode
Normally you would play MP3 or OGG in HTML5. Do MP3 files play ok?


> On Aug 25, 2017, at 11:06 AM, JOHN PATTEN via use-livecode 
>  wrote:
> 
> Hi All,
> 
> I have followed the tutorial here on playing audio files, 
> http://lessons.livecode.com/m/4071/l/742506-how-do-i-play-sound-files-in-html5
>  
> 
> 
> I have tried with both a wav file, and a m4a.  Neither of them seem to play.
> 
> Do I have to “include" the file in the Standalone Settings configuration 
> panel, or can I just add it to my HTML5 project folder?
> 
> Also, the audio tag,
>  
>
>  
> 
> ...that can go right before the ending /body tag?
> 
> 
> Thank you!


___
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

Re: Sending a message to users that floats above everything

2017-08-25 Thread J. Landman Gay via use-livecode

On 8/24/17 2:28 PM, Richard Gaskin via use-livecode wrote:


 > The equivalent for Android is in the Android object library I made
 > which is now available for anyone who attended my LC Global session.

For those who didn't, what is it and where it is?


It's an object library I made for myself that just holds various groups 
and buttons that can be used to simulate Android controls, kind of like 
Scott Rossi's iOS object libraries. It's a little rough but I uploaded 
it for conference attendees as a bonus to my presentation. I'm not sure 
if I'm allowed to give it out to others or if it's supposed to be a perk 
for those who attended, so right now it's only available to those people.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
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


Re: HTML5 - Playing Audio files tutorial?

2017-08-25 Thread JOHN PATTEN via use-livecode
Hi Collin,

No, the mp3 will not play either. I must be missing a step.  :(

http://jpatten.on-rev.com/sylvan/HTNML5%20Test.html 
. (no audio plays)

http://jpatten.on-rev.com/sylvan/ 
TestAudio2.mp3. (plays from browser)


> On Aug 25, 2017, at 11:47 AM, Colin Holgate via use-livecode 
>  wrote:
> 
> Normally you would play MP3 or OGG in HTML5. Do MP3 files play ok?
> 
> 
>> On Aug 25, 2017, at 11:06 AM, JOHN PATTEN via use-livecode 
>>  wrote:
>> 
>> Hi All,
>> 
>> I have followed the tutorial here on playing audio files, 
>> http://lessons.livecode.com/m/4071/l/742506-how-do-i-play-sound-files-in-html5
>>  
>> 
>> 
>> I have tried with both a wav file, and a m4a.  Neither of them seem to play.
>> 
>> Do I have to “include" the file in the Standalone Settings configuration 
>> panel, or can I just add it to my HTML5 project folder?
>> 
>> Also, the audio tag,
>> 
>>   
>> 
>> 
>> ...that can go right before the ending /body tag?
>> 
>> 
>> Thank you!
> 
> 
> ___
> 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

webP and webM support in LiveCode

2017-08-25 Thread Alejandro Tejada via use-livecode
Hi Monte,

on Thu Aug 24 2017, Monte Goulding wrote:
> webM would require a reasonable size refactor to players because
> we would need to wrap a custom player around the library and then
> decide which player to use depending on the movie file.
> webP on the other hand looks like it could be added without any
> refactoring, however, as you can imagine there is a _lot_ of work
> in adding an image format. It could be that such work is justified
> by the HTML5 project to help with file size. Failing that and given
> there’s a workaround of not using the format I imagine it would take
> a business services contract or an open source contribution to get
> it done. Then there’s considerations like whether adding the library
> to the engine is comparable in size to any savings one might make
> using the format. Not an issue for a browser that displays many websites
> but for us it would make the project a net loss.

I agree about webM, but savings in storage space provided
by webP are the best reason for implementing this image
compression format within LiveCode engine.

WebP format is between 60 and 40% smaller than JPG
images providing much better image quality.
WebP compress flat color graphics (with transparency)
much better than PNG or GIF.

This is not a guess based on visual comparisons.
Anyone could confirm these numbers, installing these
files and programs in their own computer:

0) Download these Standard Test Images
or use your own images:
http://sipi.usc.edu/database/
http://r0k.us/graphics/kodak/
http://links.uwaterloo.ca/Repository.html

1) Convert these TIFF and PNG images to
WebP (100% Quality) and (80% Quality)
https://developers.google.com/speed/webp/download

Convert these TIFF and PNG images
to JPG (100% Quality) and (87% Quality)
using GIMP, ImageMagick or your favorite
image conversion software.

Notice that webP images are between
60% and 40% smaller than visually
equivalent JPG images.

2) Install ImageMagick:
https://www.imagemagick.org/script/download.php
and compare original TIFF and PNG images
with compressed webP and JPG using
any or many of these algorithms that
measure the differences between images:

AE
absolute error count, number of different pixels (-fuzz effected)
DDSIM
structural dissimilarity index
FUZZ
mean color distance
MAE
mean absolute error (normalized), average channel error distance
MEPP
mean error per pixel (normalized mean error, normalized peak error)
MSE
mean error squared, average of the channel error squared
NCC
normalized cross correlation
PAE
peak absolute (normalized peak absolute)
PHASH
perceptual hash for the sRGB and HCLp colorspaces.
PSNR
peak signal to noise ratio
RMSE
root mean squared (normalized root mean squared)
SSIM
structural similarity index

For example:

magick compare -metric SSIM Peppers.tif PeppersQ100.webP result01.png

magick compare -metric PSNR Peppers.tif PeppersQ100.webP result01.png

Results are mind opening and confirm these findings:
https://developers.google.com/speed/webp/gallery

Remember that just 10 years ago (when Internet speed
was only 56k), JPG and GIF ruled the web, Flash movies
were harmless fun, PNG was just another novelty and
SVG was a gleam in the eyes of their creators.

Today, computers are much, much powerful than
10 years ago and image compression algorithms
have advanced using this new computer power.

Could you believe that an Android tablet from 2015
(that cost me only 5 dollars) could play HD video
much, much better than an Intel Atom PC
from 2005? (that cost more than 200 dollars)

Today, WebP and WebM could be only the new kids
on the block of image formats, but in a near future
wavelet and fractal compression could rule, offering
better quality and smaller file size than current
image formats.

Please, before ruling out completely the opportunity
to include a modern compressed image format
like webP, read the FAQ and API:

https://developers.google.com/speed/webp/faq
https://developers.google.com/speed/webp/docs/api

Al
___
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