
Security News
Frontier AI Is Now Critical Infrastructure
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.
imgupcanvas
Advanced tools
canvas图片预览,操控图片移动、缩放、旋转,裁切,支持PC设备部分功能;Canvas image upload preview, mobile touch device can move, zoom, rotate, clip; PC device has no rotation function.
Canvas image upload preview, mobile touch device can move, zoom, rotate, clip; PC device has no rotation function.Pictures will automatically adjust their orientation based on the meta-information they are captured and stored in,The maximum capacity of uploaded image is 10MB,Image format support (jpeg, jpg, png, gif),Will automatically create a canvas.When the picture is wrong, you can view the information through the callback function.
There must be exif-js and domhammer dependencies in the module, No need to request again during project development.
In order to achieve good device compatibility, the js startup file can add the screen-pl requirement module.
System Support: Mobile browser kernel Android4.4+ 、ios ;Pc browser kernel webkit、Chrome、Gecko.
npm install imgupcanvas --save
Add the requirement JS library file to the code, and provide a method after loading. The method provides four parameters [obj, width, height, callback, clip].Obj is the object that gets the input[file] type data, width is the width of the image to be generated, and height is the height at which the image will be generated,Callback is a function of outputting information when an error occurs,If the image format and capacity are qualified, you can ignore this parameter.Clip is an option that includes 'rect' squares and 'arc' circles,Return coordinate information by the previous callback method, Callback must also exist when Clip is present, At this point, callback returns coordinates, not error picture error messages.If you don't need clip, you can ignore it.
let imgupcanvas=require('imgupcanvas');
let obj=document.querySelector('input');
imgupcanvas(obj,100,100);
<body>
<input type="file" multiple accept="image/*" />
</body>
FAQs
canvas图片预览,操控图片移动、缩放、旋转,裁切,支持PC设备部分功能;Canvas image upload preview, mobile touch device can move, zoom, rotate, clip; PC device has no rotation function.
The npm package imgupcanvas receives a total of 3 weekly downloads. As such, imgupcanvas popularity was classified as not popular.
We found that imgupcanvas demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.