width_scale = (double) old_width / new_width;
height_scale = (double) old_height / new_height;
for (; tag ; tag=tag->next) {
- swf_tag_shape_detail_t *swf_tag_shape;
- if (swf_tag_shape_bitmap_identity(tag, image_id) == 0) {
- fprintf(stderr, "swf_object_replace_jpegdata: tag->detail == NULL\n");
- return 1;
+ if (isShapeTag(tag->tag) && (swf_tag_shape_bitmap_identity(tag, image_id) == 0)) {
+ swf_tag_shape_detail_t *swf_tag_shape;
+ swf_tag_shape = tag->detail;
+ swf_object_apply_shapematrix_factor(swf,
+ swf_tag_shape->shape_id,
+ width_scale, height_scale,
+ 0, 0, 0);
}
- swf_tag_shape = tag->detail;
- swf_object_apply_shapematrix_factor(swf,
- swf_tag_shape->shape_id,
- width_scale, height_scale,
- 0, 0, 0);
}
break;
case SWFED_SHAPE_BITMAP_RECT_RESIZE:
width_scale = (double) new_width / old_width;
height_scale = (double) new_height / old_height;
for (; tag ; tag=tag->next) {
- if (swf_tag_shape_bitmap_identity(tag, image_id) == 0) {
+ if (isShapeTag(tag->tag) && (swf_tag_shape_bitmap_identity(tag, image_id) == 0)) {
swf_tag_shape_detail_t *swf_tag_shape;
- if (tag->detail == NULL) {
- fprintf(stderr, "swf_object_replace_jpegdata: tag->detail == NULL\n");
- return 1;
- }
swf_tag_shape = tag->detail;
swf_object_apply_shaperect_factor(swf, swf_tag_shape->shape_id,
width_scale, height_scale,