Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 19, 2024
1 parent 1141d95 commit 38047cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
12 changes: 3 additions & 9 deletions src/_imagingcms.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,11 @@ findLCMStype(char *PILmode) {
if (strcmp(PILmode, "CMYK") == 0) {
return TYPE_CMYK_8;
}
if (
strcmp(PILmode, "I;16") == 0 ||
strcmp(PILmode, "I;16L") == 0 ||
strcmp(PILmode, "L;16") == 0
) {
if (strcmp(PILmode, "I;16") == 0 || strcmp(PILmode, "I;16L") == 0 ||
strcmp(PILmode, "L;16") == 0) {
return TYPE_GRAY_16;
}
if (
strcmp(PILmode, "I;16B") == 0 ||
strcmp(PILmode, "L;16B") == 0
) {
if (strcmp(PILmode, "I;16B") == 0 || strcmp(PILmode, "L;16B") == 0) {
return TYPE_GRAY_16_SE;
}
if (strcmp(PILmode, "YCbCr") == 0 || strcmp(PILmode, "YCCA") == 0 ||
Expand Down
4 changes: 2 additions & 2 deletions src/libImaging/Dib.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ ImagingNewDIB(const char *mode, int xsize, int ysize) {
return (ImagingDIB)ImagingError_MemoryError();
}

dib->bitmap =
CreateDIBSection(dib->dc, dib->info, DIB_RGB_COLORS, (void **)&dib->bits, NULL, 0);
dib->bitmap = CreateDIBSection(
dib->dc, dib->info, DIB_RGB_COLORS, (void **)&dib->bits, NULL, 0);
if (!dib->bitmap) {
free(dib->info);
free(dib);
Expand Down
3 changes: 2 additions & 1 deletion src/libImaging/TiffDecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,8 @@ ImagingLibTiffEncode(Imaging im, ImagingCodecState state, UINT8 *buffer, int byt
}

if (state->state == 1 && !clientstate->fp) {
int read = (int)_tiffReadProc((thandle_t)clientstate, (tdata_t)buffer, (tsize_t)bytes);
int read =
(int)_tiffReadProc((thandle_t)clientstate, (tdata_t)buffer, (tsize_t)bytes);
TRACE(
("Buffer: %p: %c%c%c%c\n",
buffer,
Expand Down

0 comments on commit 38047cf

Please sign in to comment.