*/
static Image *ReadMVGImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
-#define BoundingBox "viewbox"
-
DrawInfo
*draw_info;
(void) memset(&bounds,0,sizeof(bounds));
while (ReadBlobString(image,primitive) != (char *) NULL)
{
+ int
+ count;
+
for (p=primitive; (*p == ' ') || (*p == '\t'); p++) ;
- if (LocaleNCompare(BoundingBox,p,strlen(BoundingBox)) != 0)
- continue;
- (void) sscanf(p,"viewbox %lf %lf %lf %lf",&bounds.x1,&bounds.y1,
+ count=sscanf(p,"viewbox %lf %lf %lf %lf",&bounds.x1,&bounds.y1,
&bounds.x2,&bounds.y2);
+ if (count != 4)
+ continue;
image->columns=(size_t) floor((bounds.x2-bounds.x1)+0.5);
image->rows=(size_t) floor((bounds.y2-bounds.y1)+0.5);
break;