
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
anon-canvas
Advanced tools
**anon-zone** is a reusable React component for drawing and managing mask zones over images. It is designed for applications where anonymizing part of an image is required, such as hiding personal information on medical scans (e.g., ultrasounds).
anon-zone is a reusable React component for drawing and managing mask zones over images. It is designed for applications where anonymizing part of an image is required, such as hiding personal information on medical scans (e.g., ultrasounds).

npm install anon-zone
# or
yarn add anon-zone
import { AnonCanvas, type AnonCanvasApi } from "anon-canvas";
import example from "/example.png";
import { useRef } from "react";
function App() {
const ref = useRef<AnonCanvasApi | null>(null);
const handleSave = async () => {
const anonCanvas = ref.current;
if (!anonCanvas) return;
const image = await anonCanvas.toBlob();
if (!image) return;
const a = document.createElement("a");
a.href = URL.createObjectURL(image);
a.download = "image.png";
a.click();
};
return (
<div>
<AnonCanvas imageSrc={example} width={500} height={500} ref={ref} />
<button
onClick={() => {
ref.current?.reset();
}}
>
Reset
</button>
<button onClick={handleSave}>Save</button>
</div>
);
}
export default App;
imageSrc (string) – requiredThe source URL of the image to be displayed (can be local or external). This is the base image on which anonymization zones will be applied.
zones (AnonZoneProps[]) – optionalAn array of predefined anonymization zones. Each zone should follow the shape:
{
x: number;
y: number;
width: number;
height: number;
}
If provided, these zones will be rendered automatically.
zoneColor (string) – optionalThe color used to render anonymization zones. Default: black.
width (number) – optionalThe displayed width of the canvas in CSS pixels. If not set, the canvas will use the image's natural width.
height (number) – optionalThe displayed height of the canvas in CSS pixels. If not set, the canvas will use the image's natural height.
...rest – optionalAny other valid props for a native element can be passed (e.g. className, onClick, style, etc.). This is enabled via React’s ComponentPropsWithoutRef<"canvas">.
An instance of the AnonCanvas component exposes the following methods through the ref:
toBlob: Returns a Promise that resolves to a Blob of the anonymized image.toBase64: Returns a Promise that resolves to a Base64 string of the anonymized image.reset: Resets the canvas to its original state, removing all anonymization zones.FAQs
**anon-zone** is a reusable React component for drawing and managing mask zones over images. It is designed for applications where anonymizing part of an image is required, such as hiding personal information on medical scans (e.g., ultrasounds).
We found that anon-canvas demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.