Skip to content

Commit

Permalink
modifications so VS2017 WinXP will build
Browse files Browse the repository at this point in the history
  • Loading branch information
sylikc committed Oct 7, 2023
1 parent 5018819 commit 1556889
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/JPEGView/ICCProfileTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ bool ICCProfileTransform::DoTransform(void* /* transform */, const void* /* inpu

void ICCProfileTransform::DeleteTransform(void* /* transform */) { }

void* ICCProfileTransform::CreateLabTransform() {
void* ICCProfileTransform::CreateLabTransform(PixelFormat /* format */) {
return NULL;
}

Expand Down
29 changes: 15 additions & 14 deletions src/JPEGView/ImageLoadThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,30 +358,30 @@ void CImageLoadThread::ProcessRequest(CRequestBase& request) {
DeleteCachedAvifDecoder();
ProcessReadHEIFRequest(&rq);
break;
#endif
case IF_QOI:
case IF_PSD:
DeleteCachedGDIBitmap();
DeleteCachedWebpDecoder();
DeleteCachedPngDecoder();
DeleteCachedJxlDecoder();
DeleteCachedAvifDecoder();
ProcessReadQOIRequest(&rq);
ProcessReadPSDRequest(&rq);
break;
case IF_PSD:
case IF_CameraRAW:
DeleteCachedGDIBitmap();
DeleteCachedWebpDecoder();
DeleteCachedPngDecoder();
DeleteCachedJxlDecoder();
DeleteCachedAvifDecoder();
ProcessReadPSDRequest(&rq);
ProcessReadRAWRequest(&rq);
break;
case IF_CameraRAW:
#endif
case IF_QOI:
DeleteCachedGDIBitmap();
DeleteCachedWebpDecoder();
DeleteCachedPngDecoder();
DeleteCachedJxlDecoder();
DeleteCachedAvifDecoder();
ProcessReadRAWRequest(&rq);
ProcessReadQOIRequest(&rq);
break;
case IF_WIC:
DeleteCachedGDIBitmap();
Expand Down Expand Up @@ -937,6 +937,14 @@ void CImageLoadThread::ProcessReadHEIFRequest(CRequest* request) {
::CloseHandle(hFile);
delete[] pBuffer;
}

void CImageLoadThread::ProcessReadPSDRequest(CRequest* request) {
request->Image = PsdReader::ReadImage(request->FileName, request->OutOfMemory);
if (request->Image == NULL && !request->OutOfMemory) {
request->Image = PsdReader::ReadThumb(request->FileName, request->OutOfMemory);
}
}

#endif

void CImageLoadThread::ProcessReadQOIRequest(CRequest* request) {
Expand Down Expand Up @@ -985,13 +993,6 @@ void CImageLoadThread::ProcessReadQOIRequest(CRequest* request) {
delete[] pBuffer;
}

void CImageLoadThread::ProcessReadPSDRequest(CRequest* request) {
request->Image = PsdReader::ReadImage(request->FileName, request->OutOfMemory);
if (request->Image == NULL && !request->OutOfMemory) {
request->Image = PsdReader::ReadThumb(request->FileName, request->OutOfMemory);
}
}

void CImageLoadThread::ProcessReadRAWRequest(CRequest * request) {
bool bOutOfMemory = false;
try {
Expand Down

0 comments on commit 1556889

Please sign in to comment.