synchrodecoder

WebJar for synchrodecoder

License

License

GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

synchrodecoder
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

synchrodecoder
WebJar for synchrodecoder
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/NetLogo/SynchroDecoder

Download synchrodecoder

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/synchrodecoder/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>synchrodecoder</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/synchrodecoder/
implementation 'org.webjars.npm:synchrodecoder:1.0.2'
// https://jarcasting.com/artifacts/org.webjars.npm/synchrodecoder/
implementation ("org.webjars.npm:synchrodecoder:1.0.2")
'org.webjars.npm:synchrodecoder:jar:1.0.2'
<dependency org="org.webjars.npm" name="synchrodecoder" rev="1.0.2">
  <artifact name="synchrodecoder" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='synchrodecoder', version='1.0.2')
)
libraryDependencies += "org.webjars.npm" % "synchrodecoder" % "1.0.2"
[org.webjars.npm/synchrodecoder "1.0.2"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : fast-png jar [3.1.0]
org.webjars.npm : jpeg-js jar [0.3.4]

Project Modules

There are no modules declared in this project.

SynchroDecoder

What Is It?

SynchroDecoder is a JavaScript library for decoding images to ImageData synchronously. Generally, synchronous image decoding should be avoided, but, for some uses cases, it must happen synchronously, and the standard JavaScript approaches (e.g. setting an Image's src) don't allow for synchrony.

This library currently only supports JPEGs and PNGs. It probably has all manner of problems. If synchrony is not absolutely required for your use case, we strongly recommend seeking a different solution than this library. This library is only for those desperate for synchrony.

Example

const jpeg64    = "data:image/jpeg;base64,..."
const imageData = window.synchroDecoder(jpeg64);
document.getElementById('canvy').getContext('2d').putImageData(imageData, 0, 0);

(Yeah, we shouldn't just dump synchroDecoder onto window, but it's good enough for now.)

Terms of Use

CC0

SynchroDecoder is in the public domain. To the extent possible under law, Uri Wilensky has waived all copyright and related or neighboring rights.

org.webjars.npm

Center for Connected Learning

Versions

Version
1.0.2