summaryrefslogtreecommitdiff
path: root/src/imageutils-macosx.cc
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-01-26 05:20:25 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-01-26 05:20:25 (GMT)
commita66ad9c4bc10696cd3167d3217c9aad532167705 (patch)
treed1a8572792e3476d79f27b463761b2265fc05d58 /src/imageutils-macosx.cc
parentc116a0849c7531ec4d0e59b6d61aaf6137dcd568 (diff)
add ostream to Context. improve error checking. fix indents
Diffstat (limited to 'src/imageutils-macosx.cc')
-rw-r--r--src/imageutils-macosx.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/imageutils-macosx.cc b/src/imageutils-macosx.cc
index fc4803b..5236b76 100644
--- a/src/imageutils-macosx.cc
+++ b/src/imageutils-macosx.cc
@@ -11,12 +11,12 @@ size_t write_bytes_to_ostream (void *info,const void *buffer,size_t count)
size_t startpos = output->tellp();
size_t endpos = startpos;
try {
- output->write( reinterpret_cast<const char *>buffer, count );
+ output->write( (const char *)buffer, count );
endpos = output->tellp();
} catch (const std::ios_base::failure& e)
- std::cerr << "Error writing to ostream:" << e.what() << "\n";
+ std::cerr << "Error writing to ostream:" << e.what() << "\n";
}
- return endpos-startpos;
+ return (endpos-startpos);
}
CGDataConsumerRef dataconsumer CGDataConsumerCreateWithOstream(std::ostream &output)
@@ -48,8 +48,8 @@ bool write_png(std::ostream &output, unsigned char *pixels, int width, int heigh
return false;
}
- CGDataConsumerRef dataconsumer = CGDataConsumerCreateWithOstream(output);
- /*
+ CGDataConsumerRef dataconsumer = CGDataConsumerCreateWithOstream(output);
+ /*
CFStringRef fname = CFStringCreateWithCString(kCFAllocatorDefault, filename, kCFStringEncodingUTF8);
CFURLRef fileURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,
fname, kCFURLPOSIXPathStyle, false);
@@ -59,7 +59,7 @@ bool write_png(std::ostream &output, unsigned char *pixels, int width, int heigh
}
CGDataConsumerRef dataconsumer = CGDataConsumerCreateWithURL(fileURL);
- */
+ */
CFIndex fileImageIndex = 1;
CFMutableDictionaryRef fileDict = NULL;
contact: Jan Huwald // Impressum