1 --- FreeImage/Source/FreeImage/PSDParser.cpp Thu Feb 11 04:18:02 2016
2 +++ FreeImage/Source/FreeImage/PSDParser_.cpp Tue May 24 10:55:22 2022
7 - static inline UINT64 get(const BYTE * iprBuffer) {
8 - UINT64 v = ((const UINT64*)iprBuffer)[0];
9 + static inline uint64_t get(const BYTE * iprBuffer) {
10 + uint64_t v = ((const uint64_t*)iprBuffer)[0];
11 #ifndef FREEIMAGE_BIGENDIAN
16 // --------------------------------------------------------------------------
20 psdReadSize(FreeImageIO *io, fi_handle handle, const psdHeaderInfo& header) {
21 if(header._Version == 1) {
25 class PSDSetValue<8> {
27 - static inline void set(const BYTE * iprBuffer, UINT64 v) {
28 + static inline void set(const BYTE * iprBuffer, uint64_t v) {
29 #ifndef FREEIMAGE_BIGENDIAN
32 - ((UINT64*)iprBuffer)[0] = v;
33 + ((uint64_t*)iprBuffer)[0] = v;
38 // --------------------------------------------------------------------------
41 -psdWriteSize(FreeImageIO *io, fi_handle handle, const psdHeaderInfo& header, UINT64 v) {
42 +psdWriteSize(FreeImageIO *io, fi_handle handle, const psdHeaderInfo& header, uint64_t v) {
43 if(header._Version == 1) {
45 psdSetLongValue(Length, sizeof(Length), (DWORD)v);
46 @@ -1063,10 +1063,10 @@
47 bool psdParser::ReadLayerAndMaskInfoSection(FreeImageIO *io, fi_handle handle) {
50 - UINT64 nTotalBytes = psdReadSize(io, handle, _headerInfo);
51 + uint64_t nTotalBytes = psdReadSize(io, handle, _headerInfo);
53 // Hack to handle large PSB files without using fseeko().
54 - if (sizeof(long) < sizeof(UINT64)) {
55 + if (sizeof(long) < sizeof(uint64_t)) {
56 const long offset = 0x10000000;
57 while (nTotalBytes > offset) {
58 if (io->seek_proc(handle, offset, SEEK_CUR) != 0) {
60 // Short section with no layers.
65 if(_headerInfo._Version == 1) {