How to use the blueimp-load-image/js function in blueimp-load-image

To help you get started, we’ve selected a few blueimp-load-image examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github universitas / universitas.no / webpack / src / common / utils / processImageData.js View on Github external
new Promise((resolve, reject) =>
    loadImage(
      props.file,
      (canvas, meta) => {
        if (canvas.type === 'error') reject(canvas)
        resolve({
          ...props,
          small: canvas.toDataURL(),
          ...extractExifTags(meta.exif && meta.exif.getAll()),
        })
      },
      { maxHeight: THUMB_SIZE, maxWidth: THUMB_SIZE, canvas: true, meta: true },
    ),
  )

blueimp-load-image

JavaScript Load Image is a library to load images provided as File or Blob objects or via URL. It returns an optionally scaled, cropped or rotated HTML img or canvas element. It also provides methods to parse image metadata to extract IPTC and Exif tags a

MIT
Latest version published 3 years ago

Package Health Score

58 / 100
Full package analysis