madhums / madhums/node-imager

Frontend image resizing support

Open
#84 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
267
Forks
60
PR merge metrics
No merged PRs in 30d

Description

Hello

Since performance is quite hefty when people resize huge images, i have found some nice bicubic/bilinear filters for resizing images in the frontend via canvas.
http://jsfiddle.net/9g9Nv/96/
http://jsfiddle.net/amthrb4u/

However i can only upload the image via a hidden input as base64 string (haven't found a better way without using XHR). Also i can convert the base64 to binary on the server. But is there a way to pass this binary data to imager ?

``` js
var base64Data = req.body.resized_image;
images = [new Buffer(base64Data, 'base64').toString('binary')]; // doenst work with imager
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the two linked canvas examples with imager's existing image-input path; the issue provides no file or test names, so locate where the module accepts image data and how the Node Buffer is handled. Done means frontend-resized binary data has a supported path through imager, with behavior checked against the existing image handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
backend, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.