Thomas Martitz
ca634a0ac0
bitmap drawing: Negate alpha channel to match alpha information format of font files.
...
The comment about the format was actually incorrect. The alpha information
is now negated during conversion to native format, according to the
corrected comment.
Change-Id: Ifdb9ffdf9b55e39e64983eec2d9d60339e570bd9
2013-02-12 10:29:25 +01:00
Thomas Martitz
caec07be65
Handle 32bit bitmaps with all-zero alpha channel as fully opaque.
...
This is what gimp does when opening such a file.
Tt saves the alpha channel with all-0xff, but other programs might use 0x00.
As a fully transparent image doesn't make sense this should be OK.
Also split the 32bit and 24bit case in the bmp reader, they're sufficiently different.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30968 a1c6a512-1295-4272-9138-f99709370657
2011-11-11 22:03:29 +00:00
Thomas Martitz
312b2a2de7
Document the internal alpha channel format better, and fixes for 32bit alpha bitmaps.
...
For images, rows need to be even (this is not true for anti-aliased font files).
Fix stride and size calculation. This makes images that have odd pixel rows display properly and fixes buffer overflows.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30966 a1c6a512-1295-4272-9138-f99709370657
2011-11-11 19:05:11 +00:00
Thomas Martitz
354015ef28
Fix warning on mrobe100.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30942 a1c6a512-1295-4272-9138-f99709370657
2011-11-08 22:34:35 +00:00
Thomas Martitz
f443e7bbf7
Support for transparency in 32bit bitmaps on color targets.
...
This uses the alpha blending capabilities introduced with anti-aliased fonts
to draw bitmaps with transparency information. The bmp loader is extended to read
this information (pass FORMAT_TRANSPARENT in format). The alpha information will
be used when drawing the bitmap.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30937 a1c6a512-1295-4272-9138-f99709370657
2011-11-08 21:36:49 +00:00
Andree Buschmann
29f04cc986
Roll back r30416. A proper fix of this warning will end in an #ifdef-hell.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30417 a1c6a512-1295-4272-9138-f99709370657
2011-09-03 11:04:41 +00:00
Andree Buschmann
1b94cbc1ef
Remove 'set but not used' warning by GCC 4.6.1.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30416 a1c6a512-1295-4272-9138-f99709370657
2011-09-03 10:49:10 +00:00
Frank Gevaerts
68e066f400
#ifdef hell makes effectively suppressing this warning impossible, so stop trying
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30238 a1c6a512-1295-4272-9138-f99709370657
2011-08-01 20:21:34 +00:00
Frank Gevaerts
038a608bb7
Move the "warning suppression" down, so it comes after the last write to "remote", to ensure better warning avoidance
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30237 a1c6a512-1295-4272-9138-f99709370657
2011-08-01 20:13:43 +00:00
Frank Gevaerts
bd3056cb38
Suppress a "variable 'remote' set but not used" warning that some gcc versions (rightly) emit for the m:robe 100 sim. The "correct" solution would be to add about twenty five more #ifdefs to a function that already has way too many of them, or to rewrite the entire function.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30236 a1c6a512-1295-4272-9138-f99709370657
2011-08-01 20:07:05 +00:00
Nils Wallménius
3b04a85245
Remove a couple of dead inits and assignments found by the clang-static-analyzer.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29996 a1c6a512-1295-4272-9138-f99709370657
2011-06-12 22:17:45 +00:00
Andree Buschmann
e75018ad66
Fix several 'variable set but not used' warnings reported from GCC 4.6.0.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29805 a1c6a512-1295-4272-9138-f99709370657
2011-05-01 11:42:41 +00:00
Teruaki Kawashima
c4eea8f11f
FS#10535: bmp viewer plugin.
...
* changed bmp.c so that it loads bitmap larger than LCD correctly.
* removed bmp entry form inbuilt_filetypes in filetypes.c so that bmp files will be opened with bmp viewer when selected in browser.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24754 a1c6a512-1295-4272-9138-f99709370657
2010-02-18 15:10:31 +00:00
Nils Wallménius
d1a9e0c588
fix checkwps breakage caused by r229900
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22993 a1c6a512-1295-4272-9138-f99709370657
2009-10-06 22:02:06 +00:00
Karl Kurbjun
25123570c7
Fix STRIDE macro for multiscreen and add stride support for picture lib.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22615 a1c6a512-1295-4272-9138-f99709370657
2009-09-04 00:46:24 +00:00
Karl Kurbjun
e4345365f1
Add in BMP loader for vertical stride and include lcd-16bit-vert.c in SOURCES
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22580 a1c6a512-1295-4272-9138-f99709370657
2009-09-01 00:57:47 +00:00
Jens Arnold
1d6df54df2
Convert a number of places in core and plugins to use the BIT_N() macro instead of 1<<n. Speeds up things on SH1, and also reduces core binsize. Most notable speedups: 1 bit lcd driver: drawpixel +20%, drawline + 27%, hline +5%; jpeg viewer: +8% for 1/8 scaling. Other targets are unaffected.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21205 a1c6a512-1295-4272-9138-f99709370657
2009-06-07 21:27:05 +00:00
Maurus Cuelenaere
d2ea7db6f5
Should fix red
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21082 a1c6a512-1295-4272-9138-f99709370657
2009-05-25 20:15:02 +00:00
Maurus Cuelenaere
0bddb7eb65
Fix FORMAT_RETURN_SIZE in read_bmp_*() when scaling (thanks to Andrew Mahone)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21078 a1c6a512-1295-4272-9138-f99709370657
2009-05-25 15:19:34 +00:00
Maurus Cuelenaere
aec37aa5fe
* read_bmp_*(): add FORMAT_RETURN_SIZE
...
* Lua: add luaL_checkboolean() & luaL_optboolean()
* Lua: add read_bmp_file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21074 a1c6a512-1295-4272-9138-f99709370657
2009-05-25 11:12:27 +00:00
Andrew Mahone
59e70b50d8
Inline output_row_8_native when building bmp.c in core without HAVE_JPEG or HAVE_BMP_SCALING.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20886 a1c6a512-1295-4272-9138-f99709370657
2009-05-09 10:32:07 +00:00
Andrew Mahone
91efc16256
Split 8-bit-to-native conversion in bmp.c into a function, add support for plugging unscaled output in BMP and JPEG loaders, use output_row_8_native in JPEG decoder when possible.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20884 a1c6a512-1295-4272-9138-f99709370657
2009-05-09 07:31:27 +00:00
Andrew Mahone
eef7945a97
Move YUV->RGB in JPEG load from before scaler to after scaler. Required change to struct custom_format, so sorted the plugin API as well.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20856 a1c6a512-1295-4272-9138-f99709370657
2009-05-06 04:53:56 +00:00
Andrew Mahone
20f76d61ae
Make JPEG and BMP scaler optional with HAVE_JPEG and HAVE_BMP_SCALING, both defined for all targets that have HAVE_ALBUMART. Disable JPEG in PictureFlow and pluginlib album art search with 32KiB plugin buffer until PictureFlow
...
gets overlay support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20851 a1c6a512-1295-4272-9138-f99709370657
2009-05-04 15:46:41 +00:00
Maurus Cuelenaere
36c71a60ca
Get checkwps working again
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19880 a1c6a512-1295-4272-9138-f99709370657
2009-01-29 20:49:43 +00:00
Andrew Mahone
07e982df8a
cleanup for core-file-in-pluginlib compilation:
...
wrapper C files in pluginlib renamed to the same name as the core files they
wrap
pluginlib-only init functions for resize and bmp moved into the wrapper files,
and declared in the associated header files
API() macro removed entirely, in favor of a core-only header file that
redefines core function names to use a plugin_api pointer
some unnecessary uses of PLUGIN in apps/recorder/bmp.c removed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19712 a1c6a512-1295-4272-9138-f99709370657
2009-01-08 02:49:23 +00:00
Andrew Mahone
4eedc93357
build a scaling-enabled bitmap loader in pluginlib for mono bitmap targets, and use it in the test greylib scaler plugin
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19671 a1c6a512-1295-4272-9138-f99709370657
2009-01-04 21:22:05 +00:00
Andrew Mahone
9058620849
Make scaler output truly pluggable, add an 8-bit greyscale output to
...
pluginlib for use with greylib, and add source for a test scaled bmp
viewer using greylib.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19593 a1c6a512-1295-4272-9138-f99709370657
2008-12-26 07:05:13 +00:00
Andrew Mahone
f7fa7e5ad5
Latest work on the bmp on-load scaler:
...
Macros for calculating size needed for bitmap load and scaling, so that
these can be compile-time constant when their inputs are.
Reduce size of bayer dither by chopping all but first row of dither
matrix, and replacing 2D lookup with 1D lookup and small calculation.
Move some functions not related to actual bmp file loading out of bmp.c.
A smaller brightness() for mono targets, and a higher-quality one for
greyscale targets, both replacing the division by 10 with a shift.
Port of the linear and area scalers to greyscale targets, this costs
some binsize but produces better output even when dithered to 2bpp.
Move duplicated row output code from inside vertical scalers to a
separate row output function.
Move some multiplies out of the line scaler, for a small speedup and
code size reduction, as well as a small improvement in accuracy for the
upscaling case.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19592 a1c6a512-1295-4272-9138-f99709370657
2008-12-26 07:03:22 +00:00
Andrew Mahone
781421afa2
resize-on-load for bitmap files on 2bpp and color targets
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19374 a1c6a512-1295-4272-9138-f99709370657
2008-12-09 23:07:59 +00:00
Daniel Stenberg
2acc0ac542
Updated our source code header to explicitly mention that we are GPL v2 or
...
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00
Steve Bavin
799e9489ca
Remove some more simulator debugging output.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17019 a1c6a512-1295-4272-9138-f99709370657
2008-04-07 17:19:53 +00:00
Dave Chapman
78d29f535f
Major cleanup of checkwps - fix all warnings and add a script to build versions for all supported targets (plus some unsupported ones). You now need to run the version of checkwps that matches the device your WPS is for.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16831 a1c6a512-1295-4272-9138-f99709370657
2008-03-26 23:35:34 +00:00
Dave Chapman
b9bb723f12
1) Make Rockbox reject any WPSs if there are errors loading any of the required bmps; 2) Make checkwps actually load the images using the Rockbox bmp loader, and reject the WPS in the same was as Rockbox on bmp errors.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16822 a1c6a512-1295-4272-9138-f99709370657
2008-03-26 18:18:22 +00:00
Jens Arnold
8113717da9
Fix BMP loader for the iAudio M3 display.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16722 a1c6a512-1295-4272-9138-f99709370657
2008-03-20 17:40:58 +00:00
Jens Arnold
89bfb66939
BMP loader: Handle top-down BMP files (height is negative). Note that the e200 example pictures still don't work, as they are larger than the screen (not a loader problem).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15855 a1c6a512-1295-4272-9138-f99709370657
2007-11-30 08:51:18 +00:00
Nicolas Pennequin
ec6569ed22
Add read_bmp_fd and make the first parameter of read_bmp_file ("filename") const.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15553 a1c6a512-1295-4272-9138-f99709370657
2007-11-10 13:26:11 +00:00
Jonathan Gordon
6a5cc0bd25
Customizable icons for all bitmap targets. (FS#7013)
...
http://www.rockbox.org/twiki/bin/view/Main/CustomIcons for info on format and how to load them
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13177 a1c6a512-1295-4272-9138-f99709370657
2007-04-16 09:14:36 +00:00
Jens Arnold
0b2ac4b427
BMP loader: Using shifts for division by powers of 2 saves a bit on code size.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11559 a1c6a512-1295-4272-9138-f99709370657
2006-11-20 00:55:09 +00:00
Jens Arnold
848e0b5a16
BMP loader: Remote LCD format support.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11558 a1c6a512-1295-4272-9138-f99709370657
2006-11-20 00:20:09 +00:00
Jens Arnold
d1077a8a0c
Fixed the dithering once more.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11555 a1c6a512-1295-4272-9138-f99709370657
2006-11-19 14:58:12 +00:00
Jens Arnold
adc4848772
Complete rework of the BMP loader: * Support for 4 bit, 15/16 bit and 32 bit BMPs in addition to the already supported 1 bit, 8 bit and 24 bit formats. * Better protection against corrupt BMP files. * Added dithering for 2 bit targets. * Optimised, compact code. There's almost no code size increase for SH1 (only 68 bytes), and even a decrease for coldfire, with all the additional features. * Code policed. * Fixes bug that loading a backdrop worked only once per session.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11548 a1c6a512-1295-4272-9138-f99709370657
2006-11-18 14:29:51 +00:00
Jens Arnold
83e18d982c
Patch #5771 by Frederik Vestre: Fix BMP loader to work in 64bit environments (simulator).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11513 a1c6a512-1295-4272-9138-f99709370657
2006-11-11 11:26:42 +00:00
Michael Sevakis
e0710b2af1
More color adjustments. Better translation to and from native colors with even distribution of levels. Macros for extracting native depth components and packing them.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11227 a1c6a512-1295-4272-9138-f99709370657
2006-10-15 17:51:00 +00:00
Michael Sevakis
b5404b2ca6
Left some crud in bmp.c that should've been removed before committing. Don't know what's with me today
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11196 a1c6a512-1295-4272-9138-f99709370657
2006-10-12 00:25:21 +00:00
Michael Sevakis
fa0ea19d5a
Fixed the problem with the backdrops on iPod. The same problem was in the updated color picker and that is fixed too.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11195 a1c6a512-1295-4272-9138-f99709370657
2006-10-11 23:26:17 +00:00
Michael Sevakis
bed0db213d
Small bitmap dithering tweak
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11191 a1c6a512-1295-4272-9138-f99709370657
2006-10-11 18:12:36 +00:00
Michael Sevakis
756ce4abca
Fixed errors. Forgot to include system.h for swap16 in bmp.c
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11181 a1c6a512-1295-4272-9138-f99709370657
2006-10-11 01:43:53 +00:00
Michael Sevakis
76a6aaa278
Added dithering for 24 bit backdrops on 16 bit displays. FORMAT_DITHER should be specified to dither a bitmap when loading. Feel free to flame me if I got the RGB565SWAPPED thing wrong.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11180 a1c6a512-1295-4272-9138-f99709370657
2006-10-11 01:26:09 +00:00
Frank Dischner
38ae72ac1e
Fix color->grayscale bitmap loading on grayscale ipods and mono->grayscale on all grayscale targets.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9791 a1c6a512-1295-4272-9138-f99709370657
2006-04-24 15:52:05 +00:00