I have manged to turn an image into a RawBoxes
expression. How do I turn in back into something I can use in Graphics
? In particular, I want to rotate it.
Here is a minimum working example of how I messed up. Starting with
Graphics[{Green, Triangle[]}]
I copied as bitmap into PowerPoint. Later I coped from PowerPoint into Mathematica using
a = paste;
Where "paste" is where I pasted the image.
If I do
Head[a]
it returns: RawBoxes
Expressions like
Graphics[Rotate[a, π]]
Do not work (no surprise).
How do I convert an expression with Head
RawBoxes back into a graphics that I can use again?
Thanks
Graphics
quality. You can't recoverGraphics
object from that. At most, you may convert yourRawBoxes
into anImage
object $\endgroup$Graphics
objects are capable of but not bitmappedImage
objects. I strongly advise to stay away from bitmaps as long as possible and only for rasterization for viewing pusposes. $\endgroup$Graphics
objects is best. However, if you have got into the position of havingRawBoxs
perhaps because the image was never created in Mathematica what should you do? May I also point out that if you can convert to anImage
then there isImageRotate
andImageResize
etc that enables you to to the same operation on images as you can onGraphics.
. $\endgroup$