Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/imbuf/intern/jpeg.c')
-rw-r--r--source/blender/imbuf/intern/jpeg.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index 75a5f274413..3f3ebc5872d 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -158,7 +158,7 @@ static void skip_input_data(j_decompress_ptr cinfo, long num_bytes)
{
my_src_ptr src = (my_src_ptr) cinfo->src;
- if(num_bytes > 0) {
+ if (num_bytes > 0) {
// prevent skipping over file end
size_t skip_size = (size_t)num_bytes <= src->pub.bytes_in_buffer ? num_bytes : src->pub.bytes_in_buffer;
@@ -372,8 +372,8 @@ static ImBuf * ibJpegImageFromCinfo(struct jpeg_decompress_struct * cinfo, int f
}
marker= cinfo->marker_list;
- while(marker) {
- if(marker->marker != JPEG_COM)
+ while (marker) {
+ if (marker->marker != JPEG_COM)
goto next_stamp_marker;
/*
@@ -385,7 +385,7 @@ static ImBuf * ibJpegImageFromCinfo(struct jpeg_decompress_struct * cinfo, int f
* That is why we need split it to the
* common key/value here.
*/
- if(strncmp((char *) marker->data, "Blender", 7)) {
+ if (strncmp((char *) marker->data, "Blender", 7)) {
/*
* Maybe the file have text that
* we don't know "what it's", in that
@@ -432,7 +432,7 @@ next_stamp_marker:
}
jpeg_destroy((j_common_ptr) cinfo);
- if(ibuf) {
+ if (ibuf) {
ibuf->ftype = ibuf_ftype;
ibuf->profile = IB_PROFILE_SRGB;
}
@@ -447,7 +447,7 @@ ImBuf * imb_load_jpeg (unsigned char * buffer, size_t size, int flags)
struct my_error_mgr jerr;
ImBuf * ibuf;
- if(!imb_is_a_jpeg(buffer)) return NULL;
+ if (!imb_is_a_jpeg(buffer)) return NULL;
cinfo->err = jpeg_std_error(&jerr.pub);
jerr.pub.error_exit = jpeg_error;
@@ -488,11 +488,11 @@ static void write_jpeg(struct jpeg_compress_struct * cinfo, struct ImBuf * ibuf)
memcpy(neogeo + 6, &ibuf_ftype, 4);
jpeg_write_marker(cinfo, 0xe1, (JOCTET*) neogeo, 10);
- if(ibuf->metadata) {
+ if (ibuf->metadata) {
/* key + max value + "Blender" */
text= MEM_mallocN(530, "stamp info read");
iptr= ibuf->metadata;
- while(iptr) {
+ while (iptr) {
if (!strcmp (iptr->key, "None")) {
jpeg_write_marker(cinfo, JPEG_COM, (JOCTET *) iptr->value, strlen (iptr->value) + 1);
goto next_stamp_info;
@@ -520,11 +520,11 @@ next_stamp_info:
cinfo->input_components *
cinfo->image_width, "jpeg row_pointer");
- for(y = ibuf->y - 1; y >= 0; y--){
+ for (y = ibuf->y - 1; y >= 0; y--) {
rect = (uchar *) (ibuf->rect + y * ibuf->x);
buffer = row_pointer[0];
- switch(cinfo->in_color_space){
+ switch(cinfo->in_color_space) {
case JCS_RGB:
for (x = 0; x < ibuf->x; x++) {
*buffer++ = rect[0];
@@ -577,7 +577,7 @@ static int init_jpeg(FILE * outfile, struct jpeg_compress_struct * cinfo, struct
if (ibuf->planes == 32) cinfo->in_color_space = JCS_UNKNOWN;
#endif
- switch(cinfo->in_color_space){
+ switch(cinfo->in_color_space) {
case JCS_RGB:
cinfo->input_components = 3;
break;