Dane Springmeyer
bb8cd10751
tiff reader: read_generic is not implemented so throw in all cases not just if we can open the image
2016-01-06 09:17:35 -08:00
Dane Springmeyer
7608040906
centralize warning suppression
2015-11-07 17:53:09 -08:00
artemp
8c6bf0eef6
update copyright notice
2015-06-16 12:49:16 +02:00
Dane Springmeyer
20145f2fb5
fix warnings in tiff_reader
2015-06-15 20:41:51 -07:00
artemp
470da20d53
fix remanining cAmEl case names
2015-05-04 12:49:11 +02:00
Blake Thompson
2b8bd59d82
A large set of updates:
...
* Added new gray data types adding those to the variants and updating all the code necessary for them
* Added basic SSE to the image compare method, (only for RGBA) must be enabled with the -DSSE_MATH flag this is not yet put into the build process in any location.
* Fixed the resulting image for some TIFF visual tests, most likely they were incorrect due to fixes in TIFF reader
* Added some MAPNIK_DECL where necessary to grid rendering.
* Added support for more data types in GDAL plugin with grayscale images.
* Added views for all the new gray data types
* Updated python bindings for new gray data types.
Ref #2681
2015-02-04 15:41:58 -06:00
Blake Thompson
826e13f911
Renamed background to fill, added numeric casting to fill utility, changed clog uses to MAPNIK_LOG, changed the implementation of fill some so that it only used a single template
2015-01-29 13:27:42 -07:00
Dane Springmeyer
48982c0619
Merge branch 'master' of github.com:mapnik/mapnik into release/image_data_any
...
Conflicts:
tests/python_tests/image_tiff_test.py
2015-01-26 20:09:00 -08:00
Dane Springmeyer
89118c2fcb
tiff_reader: only gaurd against over-allocation at read time
2015-01-26 16:33:30 -08:00
Blake Thompson
5d9f047002
Fixed some issues in color and bindings where you could create a color and premultiplied was not set and it was resulting in it being assigned randomly, causing some issues at runtime.
...
Updated some images in visual tests that were orginally set prior to all tiffs being premultiplied, this was causing a slight difference in a few pixels.
Updated the tiff tests a lot.
Fixed tiff reader so that it always considers everything read from RGB or RGBA as premultiplied. This is due to the fact that RGBA reader always premultiplies the alpha no matter its original form.
Put in a fix so that the file does not exist no longer shows up in the test running.
Fixed some failing tests in the c++ test due to tiffs now always being premultiplied for RGB(A)
2015-01-24 20:48:15 -06:00
Blake Thompson
a100b2fe1f
Fixed the issues associated with TIFFs, now they always will return as premultiplied in the event they are rgba8 due to the way that the TIFF reader operates. Also added premultiply as a flag inside color class and exposed many of its components, made it so that setting and getting pixels took into consideration the state of the color and the image when dealing with the two.
2015-01-23 18:08:59 -06:00
Blake Thompson
490645d2e3
Perhaps a solution to TIFF IO problems
2015-01-22 20:36:45 -06:00
Blake Thompson
51172c8fdf
Move image_data.hpp to image.hpp and renamed most everything from image_data to image alone. This might lead to the need to clean up some variables that are currently named image through out the code at some time, but I think in the long term is much better as image is a better name for the base class.
2015-01-22 11:39:37 -06:00
Blake Thompson
e01ce5b7d6
Changed image_data_gray* to image_gray* Ref #2633 .
2015-01-21 21:08:04 -06:00
Blake Thompson
22a384ef33
Moved image_data_rgba8 to image_rgba8. Ref #2633
2015-01-21 20:31:02 -06:00
Blake Thompson
0f388ed68f
Changed the name of image_data_any to image_any. Moved header file for image_data_any to image_any. Ref #2633
2015-01-21 19:40:12 -06:00
Blake Thompson
4184f75011
Moved premultiply and demultiply out of image_32 and other parts of the code. The image_data object is now responsible for keeping track of its own premultiplied_alpha status. Created a new utility method in image_util to preform premultiplication.
...
Added visitor pattern to several different methods as well to prepare for image_data_any including compositing.
Ref #2633
2015-01-14 12:42:30 -06:00
artemp
12eb56d96a
better names + unbuffered io + use image_data_xxx for allocating strip
...
e# 2x2.png
2014-12-17 18:34:47 +01:00
Blake Thompson
0d2eb9cb5f
Updates for Ref #2594 and #2592 (Related to #2491 )
...
* Added support for scanline, stripped and tiled
* Added new configuration options for TIFF:
- method
- tile_height (Default 0)
- tile_width (Default 0)
- rows_per_strip (Default 0)
* Removed 'scanline' configuration option for TIFF.
* Changed RGBA TIFFs to be ASSOCALPHA rather then UNASSOCALPHA
2014-12-15 02:52:32 +00:00
artemp
72f437c52a
tiff_reader - fix
...
( "...where the -Sy is due the reversal of direction from J increasing- down in raster space to Y increasing-up in model space.")
2014-12-12 10:18:34 +01:00
artemp
218b22fba9
remove cast
2014-12-11 09:38:58 +01:00
artemp
5021a4e122
tiff_reader - fix end_y calc in read_stripped
2014-12-10 18:11:41 +01:00
artemp
74c96f0bda
make bounding_box return optional<box2d<double>> to be consistent with current behavour
2014-12-10 12:53:39 +01:00
artemp
2efde962aa
image_reader - add bounding_box virtual method
2014-12-10 10:44:51 +01:00
Dane Springmeyer
93c6207153
repack tiff_reader to avoid slop (saves 16 bytes)
2014-12-09 08:34:13 -05:00
artemp
303d625b7c
tiff_reader - fix reading tiled tiffs + flip vertically output from TIFFReadRGBATile + cleaups
2014-12-09 12:25:21 +01:00
Dane Springmeyer
36d7e455ed
tiff io: disable strip chopping to ensure we fail fast on 'tiff_dos_strip_chop.tif' from gdal autotests
2014-12-09 00:39:19 -05:00
Dane Springmeyer
fcf71c36d9
tiff io: avoid over-allocation + add more tests
2014-12-09 00:17:02 -05:00
Dane Springmeyer
8b0ba79d2a
more debugging output for failed read_tile
2014-12-08 20:39:44 -05:00
Dane Springmeyer
24a9816913
test tiff photometric setting
2014-12-08 17:16:56 -05:00
Dane Springmeyer
f121d805a9
no need for TIFFRGBAImageOK
2014-12-08 17:12:44 -05:00
Dane Springmeyer
6ca1cd6c74
avoid crashing on images with alpha
2014-12-08 16:43:32 -05:00
Dane Springmeyer
cb3771fbe5
fix reading of tiled tiff tile dimensions for gray32f
2014-12-08 15:23:06 -05:00
Dane Springmeyer
bc3f59af12
new c++ tiff tests - refs #2491
2014-12-08 14:52:52 -05:00
artemp
7fcc4a0846
use TIFFReadTile (or TIFFReadEncodedTile) instead of TIFFReadRGBATile to have consistent orientation
...
(FIXME: python tests failures)
2014-12-08 18:55:40 +01:00
artemp
912771b8fd
generic read_tiled<ImageData> initial implementation + read PHOTOMETRIC_RGB using high-level RGBA expanding interface
2014-12-08 15:51:00 +01:00
Dane Springmeyer
96baff431f
use c++ style casts im tiff_reader
2014-12-05 13:59:20 -05:00
artemp
ce605e3982
use RAII for resource management
2014-12-05 18:01:45 +01:00
artemp
902858e55f
tiff_reader: initial support for reading gray8/gray16/gray32f/rgba8/rgba16/rgba32f data
...
Note: current code only works with image data organized in strips. Tile-orientated reading needs implementing
2014-12-05 17:35:26 +01:00
artemp
38da080f82
make concrete image_data type names more expressive and explicit about color channels/depth:
...
image_data_32 -> image_data_rgba8
image_data_8 -> image_data_gray8
image_data_16 -> image_data_gray16
image_data_float32 -> image_data_gray32f
NOTE: currently image_data_gray16::pixel_type = std::int16_t (signed 16 bit int) to match GDAL
should we support unsigned types?
2014-12-04 11:02:42 +01:00
Dane Springmeyer
f82d57f497
work in progress: start enhancing tiff reader to handle bits per sample
2014-12-03 18:37:27 -05:00
artemp
802428712e
initial image_data_any read(...) implementation - always read into image_data_32
2014-12-03 10:56:19 +01:00
artemp
1df9d89a70
add to image_reader and implement empty (placeholder)
...
```image_data_any read(unsigned x, unsigned y, unsigned width, unsigned height) final```
in png/jpeg/webp/tiff readers
2014-12-03 10:44:56 +01:00
artemp
333965b588
update copyright year
2014-11-20 15:25:50 +01:00
Dane Springmeyer
83588937b9
silence boost warnings
2014-10-21 16:37:27 -07:00
Dane Springmeyer
91ee910ad2
remove debugging line
2014-09-11 15:46:49 -07:00
Dane Springmeyer
519149087e
add support to tiff reader for reporting alpha
2014-09-11 15:44:48 -07:00
artemp
3cb047fc5c
avoid callling TIFFs global structures ref #2391
2014-09-05 12:30:33 +01:00
artemp
fe215a684e
c++11 style : replace (almost) all typedef with type alias's
2014-07-07 18:23:15 +01:00
Dane Springmeyer
8bb77bce92
image readers: ability to check if image has alpha before full read
...
Conflicts:
src/webp_reader.cpp
2014-06-16 09:52:26 -07:00