29#if (JUCE_MAC || JUCE_IOS) && USE_COREGRAPHICS_RENDERING && JUCE_USE_COREIMAGE_LOADER
30 Image juce_loadWithCoreImage (InputStream& input);
46 int imageWidth, imageHeight;
51 if (
in.read (buf, 3) != 3)
54 int numColours = 2 << (buf[0] & 7);
57 if ((buf[0] & 0x80) != 0)
62 if (
input.read (buf, 1) != 1 || buf[0] ==
';')
76 if (
input.read (buf, 9) == 9)
81 numColours = 2 << (buf[8] & 7);
83 if ((buf[8] & 0x80) != 0)
88 imageWidth, imageHeight, transparent >= 0);
90 image.getProperties()->set (
"originalImageHadAlpha", transparent >= 0);
92 readImage ((buf[8] & 0x40) != 0, transparent);
121 if (
input.read (
b, 6) == 6
122 && (strncmp (
"GIF87a",
b, 6) == 0
123 || strncmp (
"GIF89a",
b, 6) == 0))
125 if (
input.read (
b, 4) == 4)
129 return w > 0 &&
h > 0;
138 for (
int i = 0;
i < numCols; ++
i)
143 palette[
i].setARGB (0xff, rgb[0], rgb[1], rgb[2]);
153 if (
input.read (&
n, 1) == 1)
271 const int incode =
code;
312 int getCode (
const int codeSize_,
const bool shouldInitialise)
314 if (shouldInitialise)
343 for (
int j = 0;
j < codeSize_; ++
j)
353 bool readImage (
const int interlace,
const int transparent)
356 if (
input.read (&
c, 1) != 1)
361 if (transparent >= 0)
362 palette [transparent].setARGB (0, 0, 0, 0);
364 int xpos = 0, ypos = 0, yStep = 8, pass = 0;
368 const bool hasAlpha =
image.hasAlphaChannel();
383 if (++xpos == destData.
width)
391 while (ypos >= destData.
height)
395 case 1: ypos = 4; yStep = 8;
break;
396 case 2: ypos = 2; yStep = 4;
break;
397 case 3: ypos = 1; yStep = 2;
break;
398 default:
return true;
404 if (++ypos >= destData.
height)
433 return (
in.read (header, sizeof (header)) == (
int)
sizeof (header))
441 #if (JUCE_MAC || JUCE_IOS) && USE_COREGRAPHICS_RENDERING && JUCE_USE_COREIMAGE_LOADER
442 return juce_loadWithCoreImage (
in);
444 const std::unique_ptr<GIFLoader> loader (
new GIFLoader (
in));
445 return loader->image;
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
static constexpr uint16 littleEndianShort(const void *bytes) noexcept
Definition juce_ByteOrder.h:202
Definition juce_File.h:45
Definition juce_GIFLoader.cpp:37
int clearCode
Definition juce_GIFLoader.cpp:110
int setCodeSize
Definition juce_GIFLoader.cpp:107
int readExtension(int &transparent)
Definition juce_GIFLoader.cpp:164
bool dataBlockIsZero
Definition juce_GIFLoader.cpp:105
int codeSize
Definition juce_GIFLoader.cpp:107
int stack[2 *maxGifCode]
Definition juce_GIFLoader.cpp:113
int lastBit
Definition juce_GIFLoader.cpp:106
int readDataBlock(uint8 *const dest)
Definition juce_GIFLoader.cpp:150
bool readPalette(const int numCols)
Definition juce_GIFLoader.cpp:136
int * sp
Definition juce_GIFLoader.cpp:114
int table[2][maxGifCode]
Definition juce_GIFLoader.cpp:112
int readLZWByte()
Definition juce_GIFLoader.cpp:224
InputStream & input
Definition juce_GIFLoader.cpp:102
uint8 buffer[260]
Definition juce_GIFLoader.cpp:103
int maxCode
Definition juce_GIFLoader.cpp:108
bool getSizeFromHeader(int &w, int &h)
Definition juce_GIFLoader.cpp:116
int lastByteIndex
Definition juce_GIFLoader.cpp:106
int oldcode
Definition juce_GIFLoader.cpp:109
PixelARGB palette[256]
Definition juce_GIFLoader.cpp:104
bool fresh
Definition juce_GIFLoader.cpp:105
bool readImage(const int interlace, const int transparent)
Definition juce_GIFLoader.cpp:353
bool finished
Definition juce_GIFLoader.cpp:105
void initialise(const int inputCodeSize)
Definition juce_GIFLoader.cpp:208
int firstcode
Definition juce_GIFLoader.cpp:109
int getCode(const int codeSize_, const bool shouldInitialise)
Definition juce_GIFLoader.cpp:312
int endCode
Definition juce_GIFLoader.cpp:110
int currentBit
Definition juce_GIFLoader.cpp:106
Image image
Definition juce_GIFLoader.cpp:99
GIFLoader(InputStream &in)
Definition juce_GIFLoader.cpp:39
@ maxGifCode
Definition juce_GIFLoader.cpp:111
int maxCodeSize
Definition juce_GIFLoader.cpp:108
void clearTable()
Definition juce_GIFLoader.cpp:192
Definition juce_Image.h:310
int pixelStride
Definition juce_Image.h:355
int height
Definition juce_Image.h:356
@ writeOnly
Definition juce_Image.h:315
uint8 * getPixelPointer(int x, int y) const noexcept
Definition juce_Image.h:334
int width
Definition juce_Image.h:356
Definition juce_Image.h:58
@ ARGB
Definition juce_Image.h:67
@ RGB
Definition juce_Image.h:66
Definition juce_OutputStream.h:38
Definition juce_PixelFormats.h:59
Definition juce_PixelFormats.h:354
Definition juce_String.h:53
UINT_D64 w
Definition inflate.c:942
register unsigned j
Definition inflate.c:1576
register unsigned i
Definition inflate.c:1575
unsigned f
Definition inflate.c:1572
#define JUCE_BEGIN_IGNORE_WARNINGS_MSVC(warnings)
Definition juce_CompilerWarnings.h:198
#define JUCE_END_IGNORE_WARNINGS_MSVC
Definition juce_CompilerWarnings.h:199
float in
Definition lilv_test.c:1460
Definition carla_juce.cpp:31
unsigned char uint8
Definition juce_MathsFunctions.h:37
#define false
Definition ordinals.h:83
int n
Definition crypt.c:458
uch * p
Definition crypt.c:594
return c
Definition crypt.c:175
if(GLOBAL(newzip))
Definition crypt.c:475
uch h[RAND_HEAD_LEN]
Definition crypt.c:459
int result
Definition process.c:1455
typedef int(UZ_EXP MsgFn)()