diff --git a/uppsrc/PdfDraw/PdfDraw.cpp b/uppsrc/PdfDraw/PdfDraw.cpp index 328582845..3d527270f 100644 --- a/uppsrc/PdfDraw/PdfDraw.cpp +++ b/uppsrc/PdfDraw/PdfDraw.cpp @@ -614,7 +614,11 @@ String PdfDraw::Finish(const PdfSignatureInfo *sign) const Image& m = images[i]; if(m.GetSerialId() == JPEGDummy().GetSerialId()) { String jpg = jpeg[jpegi++]; - Size isz = StreamRaster::LoadStringAny(jpg).GetSize(); + StringStream ss(jpg); + One r = StreamRaster::OpenAny(ss); + Size isz(1, 1); + if(r) + isz = r->GetSize(); BeginObj(); out << "<< " << " /Width " << isz.cx << " /Height " << isz.cy << " /Length " << jpg.GetLength() diff --git a/uppsrc/RichText/RichImage.cpp b/uppsrc/RichText/RichImage.cpp index cb4677b84..42226e7cf 100644 --- a/uppsrc/RichText/RichImage.cpp +++ b/uppsrc/RichText/RichImage.cpp @@ -165,7 +165,7 @@ Image RichPNG::ToImage(const Value& data, Size sz, void *) const if(IsString(data)) { ImageAnyDraw iw(sz); Paint(data, iw, sz); - return iw; + return iw; } Image x = Image(data); Size outsz(min(sz.cx, 4 * x.GetWidth()), min(sz.cy, 4 * x.GetHeight()));