[Rawstudio-commit] r2362 - trunk/src
Anders Brander
anders at brander.dk
Thu Apr 9 20:03:28 CEST 2009
Author: abrander
Date: 2009-04-09 20:03:28 +0200 (Thu, 09 Apr 2009)
New Revision: 2362
Modified:
trunk/src/rs-jpeg.c
Log:
Fixed rs_jpeg_save() to read profile correctly.
Modified: trunk/src/rs-jpeg.c
===================================================================
--- trunk/src/rs-jpeg.c 2009-04-09 17:58:59 UTC (rev 2361)
+++ trunk/src/rs-jpeg.c 2009-04-09 18:03:28 UTC (rev 2362)
@@ -106,9 +106,11 @@
if (st.st_size>0)
if ((fd = open(profile_filename, O_RDONLY)) != -1)
{
+ gint bytes_read = 0;
len = st.st_size;
buffer = g_malloc(len);
- read(fd, buffer, len);
+ while(bytes_read < len)
+ bytes_read += read(fd, buffer+bytes_read, len-bytes_read);
close(fd);
rs_jpeg_write_icc_profile(&cinfo, buffer, len);
g_free(buffer);
More information about the Rawstudio-commit
mailing list