1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 18:29:23 +02:00

native fb2 support (in progress)

This commit is contained in:
Nikolay Pultsin 2012-03-26 23:07:28 +01:00
parent 4d90732a37
commit e80b6e8015
10 changed files with 35 additions and 16 deletions

View file

@ -18,7 +18,8 @@
*/
#include <ZLFile.h>
#include <ZLBase64EncodedImage.h>
#include <ZLImage.h>
//#include <ZLBase64EncodedImage.h>
#include "FB2CoverReader.h"
@ -53,7 +54,7 @@ void FB2CoverReader::startElementHandler(int tag, const char **attributes) {
const char *id = attributeValue(attributes, "id");
const char *contentType = attributeValue(attributes, "content-type");
if (id != 0 && contentType != 0 && myImageReference == id) {
myImage = new ZLBase64EncodedImage(contentType);
//myImage = new ZLBase64EncodedImage(contentType);
}
}
}
@ -72,7 +73,7 @@ void FB2CoverReader::endElementHandler(int tag) {
case _BINARY:
if (!myImage.isNull()) {
if (!myImageBuffer.empty()) {
((ZLBase64EncodedImage&)*myImage).addData(myImageBuffer);
//((ZLBase64EncodedImage&)*myImage).addData(myImageBuffer);
myImageBuffer.clear();
} else {
myImage = 0;