Apps Script v8: ArrayBuffers and Typed Arrays

55 views
Skip to first unread message

Bruce Mcpherson

unread,
Mar 25, 2020, 8:21:47 AM3/25/20
to Google Apps Script Community
Apps Script V8 implements ArrayBuffers and Typed arrays from ES6. If you’ve used Apps Script Crypto Utilities or done any work with Blobs, then this is what’s going on behind the scenes, now exposed as part of the language.

https://ramblings.mcpher.com/apps-script/apps-script-v8/apps-script-v8-arraybuffers-and-typed-arrays/

Romain Vialard

unread,
Mar 25, 2020, 8:34:53 AM3/25/20
to Google Apps Script Community
Thanks Bruce.
Have you tried to manipulate images thanks to that? (eg: resize / compress an existing image)

Bruce Mcpherson

unread,
Mar 25, 2020, 9:18:18 AM3/25/20
to google-apps-sc...@googlegroups.com
Hi Romain

No I haven't tried that. This is something I do a lot in Node, but for that there are a number of packages for manipulating images. I may have a look at the details if I get some time.

cheers




On Wed, 25 Mar 2020 at 12:34, Romain Vialard <romain....@gmail.com> wrote:
Thanks Bruce.
Have you tried to manipulate images thanks to that? (eg: resize / compress an existing image)

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/778e3325-d9ac-4afa-ac70-b12a32923bc9%40googlegroups.com.

Romain Vialard

unread,
Mar 25, 2020, 9:30:46 AM3/25/20
to Google Apps Script Community
Great, if you are already familiar with existing packages for Node it would be interesting to see how easy / possible it is to reuse them in Apps Script.
I know several people in the past were interested by easy image manipulation directly in Apps Script (eg: to resize a bunch of images stored in Drive)

Riël Notermans

unread,
Mar 25, 2020, 9:33:27 AM3/25/20
to Google Apps Script Community
To be honest I have seen javascript code doing that with blobs (as bytearrays), in apps script, in the past...?

Met vriendelijke groet,

pic
Riël Notermans
Technisch Directeur
logo
phone
email
email
040 711 41 94
ri...@zzapps.nl
www.zzapps.nl


On Wed, Mar 25, 2020 at 2:30 PM Romain Vialard <romain....@gmail.com> wrote:
Great, if you are already familiar with existing packages for Node it would be interesting to see how easy / possible it is to reuse them in Apps Script.
I know several people in the past were interested by easy image manipulation directly in Apps Script (eg: to resize a bunch of images stored in Drive)

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.

Tanaike

unread,
Mar 26, 2020, 4:21:37 AM3/26/20
to Google Apps Script Community
Thank you for the information. From the information, I could know that Google Apps Script can become more affinity to Javascript when the binary data is processed. Also I would like to measure the process cost for this.

Bruce Mcpherson

unread,
Mar 26, 2020, 11:55:08 AM3/26/20
to google-apps-sc...@googlegroups.com
Yes, you could fiddle around with byte arrays in legacy apps script, but the mapping variables that spread over multiple bytes back to actual numbers is now solved with the Typed Arrays



Reply all
Reply to author
Forward
0 new messages