} format_type;
static int writer(const uint8_t* data, size_t data_size, const WebPPicture* const pic) {
- return (gvwrite(pic->custom_ptr, (const char *)data, data_size) == data_size) ? 1 : 0;
+ return gvwrite(pic->custom_ptr, (const char *)data, data_size) == data_size ? 1 : 0;
}
static void webp_format(GVJ_t * job)
size_t data_size = (size_t)size;
fseek(in, 0, SEEK_SET);
data = malloc(data_size);
- ok = (fread(data, data_size, 1, in) == 1);
+ ok = fread(data, data_size, 1, in) == 1;
if (!ok) {
fprintf(stderr, "Error: WebP could not read %zu bytes of data from %s\n",
data_size, in_file);
unsigned char *p, t;
for (y = 0; y < output_buffer->height; y++) {
- p = output_buffer->u.RGBA.rgba + (output_buffer->u.RGBA.stride * y);
+ p = output_buffer->u.RGBA.rgba + output_buffer->u.RGBA.stride * y;
for (x = 0; x < output_buffer->width; x++) {
t = p[0]; /* swap red/blue */
p[0] = p[2];
end:
free(data);
- ok = (status == VP8_STATUS_OK);
+ ok = status == VP8_STATUS_OK;
if (!ok) {
fprintf(stderr, "Error: WebP decoding of %s failed.\n", in_file);
fprintf(stderr, "Status: %d (%s)\n", status, kStatusMessages[status]);
if (surface) {
cairo_save(cr);
cairo_translate(cr, b.LL.x, -b.UR.y);
- cairo_scale(cr, (b.UR.x - b.LL.x)/(us->w), (b.UR.y - b.LL.y)/(us->h));
+ cairo_scale(cr, (b.UR.x - b.LL.x) / us->w, (b.UR.y - b.LL.y) / us->h);
cairo_set_source_surface (cr, surface, 0, 0);
cairo_paint (cr);
cairo_restore(cr);