Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Make big image fit to canvas - Kevin Powell - Community
KP-C
Kevin Powell - Community
•
16mo ago
•
15 replies
MC23
Make big image fit to canvas
Hi everyone
, I
'm trying to create a scratch effect using canvas
.
I
'm having problems understanding how to make the
"hidden
" pic to behave like an
object-fit: cover
object-fit: cover
would
.
.
. I know that I probably have to scale it
, but I don
't understand how
.
(
https://stackoverflow.com/questions/23104582/scaling-an-image-to-fit-on-canvas
)
https://codepen.io/n00bCod3r/pen/gbYwxBY
Just hold LMB and scratch the image
, you
'll see the hidden one appear
Kevin Powell - Community
Join
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.
36,263
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
How to make <div> fit image width
KP-C
Kevin Powell - Community / front-end
3y ago
Make an image fit a carousel
KP-C
Kevin Powell - Community / front-end
4y ago
Trying to make Canvas image into a circular image in chart.js(Line Graph)
KP-C
Kevin Powell - Community / front-end
4y ago
how to make image fit the screen at the top of the screen?
KP-C
Kevin Powell - Community / front-end
3y ago