mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
commit
1b2f6ae1b8
|
@ -278,7 +278,7 @@ findLCMStype(char* PILmode)
|
||||||
return TYPE_YCbCr_8;
|
return TYPE_YCbCr_8;
|
||||||
}
|
}
|
||||||
else if (strcmp(PILmode, "LAB") == 0) {
|
else if (strcmp(PILmode, "LAB") == 0) {
|
||||||
// LabX equvalent like ALab, but not reversed -- no #define in lcms2
|
// LabX equivalent like ALab, but not reversed -- no #define in lcms2
|
||||||
return (COLORSPACE_SH(PT_LabV2)|CHANNELS_SH(3)|BYTES_SH(1)|EXTRA_SH(1));
|
return (COLORSPACE_SH(PT_LabV2)|CHANNELS_SH(3)|BYTES_SH(1)|EXTRA_SH(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -572,7 +572,7 @@ setup_module(PyObject* m) {
|
||||||
PyType_Ready(&Font_Type);
|
PyType_Ready(&Font_Type);
|
||||||
|
|
||||||
if (FT_Init_FreeType(&library))
|
if (FT_Init_FreeType(&library))
|
||||||
return 0; /* leave it uninitalized */
|
return 0; /* leave it uninitialized */
|
||||||
|
|
||||||
FT_Library_Version(library, &major, &minor, &patch);
|
FT_Library_Version(library, &major, &minor, &patch);
|
||||||
|
|
||||||
|
|
2
encode.c
2
encode.c
|
@ -737,7 +737,7 @@ PyImaging_LibTiffEncoderNew(PyObject* self, PyObject* args)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// While failes on 64 bit machines, complains that pos is an int instead of a Py_ssize_t
|
// While fails on 64 bit machines, complains that pos is an int instead of a Py_ssize_t
|
||||||
// while (PyDict_Next(dir, &pos, &key, &value)) {
|
// while (PyDict_Next(dir, &pos, &key, &value)) {
|
||||||
for (pos=0;pos<d_size;pos++){
|
for (pos=0;pos<d_size;pos++){
|
||||||
key = PyList_GetItem(keys,pos);
|
key = PyList_GetItem(keys,pos);
|
||||||
|
|
|
@ -345,7 +345,7 @@ int quantize_octree(Pixel *pixelData,
|
||||||
/*
|
/*
|
||||||
Create two color cubes, one fine grained with 8x16x8=1024
|
Create two color cubes, one fine grained with 8x16x8=1024
|
||||||
colors buckets and a coarse with 4x4x4=64 color buckets.
|
colors buckets and a coarse with 4x4x4=64 color buckets.
|
||||||
The coarse one guarantes that there are color buckets available for
|
The coarse one guarantees that there are color buckets available for
|
||||||
the whole color range (assuming nQuantPixels > 64).
|
the whole color range (assuming nQuantPixels > 64).
|
||||||
|
|
||||||
For a quantization to 256 colors all 64 coarse colors will be used
|
For a quantization to 256 colors all 64 coarse colors will be used
|
||||||
|
@ -421,7 +421,7 @@ int quantize_octree(Pixel *pixelData,
|
||||||
/* add fine colors to the lookup cube */
|
/* add fine colors to the lookup cube */
|
||||||
add_lookup_buckets(lookupCube, paletteBuckets, nFineColors, nCoarseColors);
|
add_lookup_buckets(lookupCube, paletteBuckets, nFineColors, nCoarseColors);
|
||||||
|
|
||||||
/* create result pixles and map palatte indices */
|
/* create result pixels and map palette indices */
|
||||||
qp = malloc(sizeof(Pixel)*nPixels);
|
qp = malloc(sizeof(Pixel)*nPixels);
|
||||||
if (!qp) goto error;
|
if (!qp) goto error;
|
||||||
map_image_pixels(pixelData, nPixels, lookupCube, qp);
|
map_image_pixels(pixelData, nPixels, lookupCube, qp);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* The Python Imaging Library
|
* The Python Imaging Library
|
||||||
* $Id$
|
* $Id$
|
||||||
*
|
*
|
||||||
* Pillow image resamling support
|
* Pillow image resampling support
|
||||||
*
|
*
|
||||||
* history:
|
* history:
|
||||||
* 2002-03-09 fl Created (for PIL 1.1.3)
|
* 2002-03-09 fl Created (for PIL 1.1.3)
|
||||||
|
|
|
@ -245,7 +245,7 @@ int ImagingLibTiffDecode(Imaging im, ImagingCodecState state, UINT8* buffer, int
|
||||||
// back in. Can't use read encoded stripe.
|
// back in. Can't use read encoded stripe.
|
||||||
|
|
||||||
// This thing pretty much requires that I have the whole image in one shot.
|
// This thing pretty much requires that I have the whole image in one shot.
|
||||||
// Prehaps a stub version would work better???
|
// Perhaps a stub version would work better???
|
||||||
while(state->y < state->ysize){
|
while(state->y < state->ysize){
|
||||||
if (TIFFReadScanline(tiff, (tdata_t)state->buffer, (uint32)state->y, 0) == -1) {
|
if (TIFFReadScanline(tiff, (tdata_t)state->buffer, (uint32)state->y, 0) == -1) {
|
||||||
TRACE(("Decode Error, row %d\n", state->y));
|
TRACE(("Decode Error, row %d\n", state->y));
|
||||||
|
|
|
@ -808,7 +808,7 @@ unpackI12_I16(UINT8* out, const UINT8* in, int pixels){
|
||||||
|
|
||||||
FillOrder = 2 should be used only when BitsPerSample = 1 and
|
FillOrder = 2 should be used only when BitsPerSample = 1 and
|
||||||
the data is either uncompressed or compressed using CCITT 1D
|
the data is either uncompressed or compressed using CCITT 1D
|
||||||
or 2D compression, to avoid potentially ambigous situations.
|
or 2D compression, to avoid potentially ambiguous situations.
|
||||||
|
|
||||||
Yeah. I thought so. We'll see how well people read the spec.
|
Yeah. I thought so. We'll see how well people read the spec.
|
||||||
We've got several fillorder=2 modes in TiffImagePlugin.py
|
We've got several fillorder=2 modes in TiffImagePlugin.py
|
||||||
|
|
Loading…
Reference in New Issue
Block a user