I was wondering whether there is any way to convert an image/graphic into a Shape
? For example, can I convert the outline of a motorcycle shape into a Shape
so I can then use it in Java? I know you can do it with normal squares or with rounded corners, polygons, etc. But is there a way to do a custom shape?
相关问题
- Views base64 encoded blob in HTML with PHP
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- How to get the background from multiple images by
function
getArea_FastHack
is build upon Andrew Thompsons work, which was very helpful. Mine should be faster, however: (//Edit: and sloppier, too)Here's something faster but less accurate, useful for collision checking or 2D physics.
motorcycle.jpg
motorcycle-03.png
ImageOutline.java
This code requires some patience (when running).