Closed GoogleCodeExporter closed 9 years ago
Hi,
What is the mathml?
Original comment by ionel.alexandru@gmail.com
on 16 Apr 2013 at 1:08
Sorry, there was a mistake in the mathMl. My Mistake. I apologize for posting
this.
Original comment by CSekhar...@gmail.com
on 17 Apr 2013 at 12:54
No problem :)
Original comment by ionel.alexandru@gmail.com
on 17 Apr 2013 at 12:57
I am taking the image of the formula using myFormula.getBase64Image("String",
100, false);
And then I am converting the base64image data to JPEG using the Base64Decoder
to JPEG and then saving converted data to the JPEG file in the local system.
The file gets saved but the file doesnt contain the image of the equation
(white image is getting saved). can u please help me out in finding what is
going wrong with it. The code I have written is given bellow.
var decoder:Base64Decoder = new Base64Decoder;
decoder.decode(base64imageData);
var byteArray:ByteArray = decoder.toByteArray();
img.load(byteArray);
img.addEventListener(ResizeEvent.RESIZE, imgLoaded);
private function imgLoaded(event:Event):void
{
var bmpData:BitmapData = new BitmapData(img.width, img.height);
bmpData.draw(img);
var jpgenc:JPEGEncoder = new JPEGEncoder(100);
var imgByteArray:ByteArray = jpgenc.encode(bmpData);
fullPath = path + "\\question.jpg";
file = new File(fullPath);
fs = new FileStream();
fs.open(file, FileMode.WRITE);
fs.writeBytes(imgByteArray);
fs.close();
}
Thanks For your support.
Without your help I could not have proceeded to this point in my project.
Original comment by CSekhar...@gmail.com
on 17 Apr 2013 at 1:12
What is myFormula.getBase64Image("String", 100, false) ?
Why "String", must be JPG or PNG
Original comment by ionel.alexandru@gmail.com
on 17 Apr 2013 at 1:42
Original issue reported on code.google.com by
CSekhar...@gmail.com
on 16 Apr 2013 at 12:48