Commit Graph

303 Commits

Author SHA1 Message Date
Rene Gollent
79e1e772ac Build fix for gcc4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 17:04:25 +00:00
Axel Dörfler
2f00291de2 * The EXIF parser now keeps a set of visited offsets to avoid entering endless
loops with corrupted data.
* This fixes bug #2206.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 12:28:01 +00:00
Jérôme Duval
e6b421a98e fix misuse of ... with B_UTF8_ELLIPSIS
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-29 21:48:36 +00:00
Axel Dörfler
e4ffdb7a94 * Added a more generic subtype for the source code files for automatic
MIME type guessing.
* Now, if the specific MIME type exists, it will be chosen, if it doesn't,
  the generic MIME type is chosen. If that does not exist either, the most
  generic is chosen (a.k.a. "text/plain").


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-01 11:56:30 +00:00
Jérôme Duval
ac43767349 HPGSTranslator now uses the class StreamBuffer
adjusted StreamBuffer::Seek() to match BPositionIO API


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-23 15:05:45 +00:00
Stephan Aßmus
9640a42e77 * Got rid of the casting in Read, motivated by a patch sent by Fredrik Ekdahl,
should also fix GCC4 build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-23 11:03:37 +00:00
Jérôme Duval
45ff9decad EXRTranslator now uses the StreamBuffer class
added StreamBuffer::Position()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-22 22:00:41 +00:00
Jérôme Duval
e26a124818 PCXTranslator now uses the StreamBuffer class
fixed StreamBuffer::Read() to handle bigger reads
added a write mode
revised code style and license header


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-22 21:21:39 +00:00
Jérôme Duval
a9c0a648b1 added libtranslatorsutils.a and used it in every translator instead of reusing sources
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-22 18:39:39 +00:00
Stefano Ceccherini
e70bc53485 Renamed libtiff to tiff
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-18 09:04:48 +00:00
Stefano Ceccherini
96f0c48768 removed duplicated and obsolete tiff translator
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-18 09:01:20 +00:00
Stefano Ceccherini
dc0d6e4c0d Set the LowColor as ViewColor, so text looks better. Fix a few menufield
position/size issues. Use B_PANEL_BACKGROUND_COLOR instead of the raw 
numbers. Fixes bug #1800.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-18 08:57:35 +00:00
Jérôme Duval
c9794bddd7 added a PCX translator with some supported formats
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-16 13:02:03 +00:00
Jérôme Duval
cbc337d925 have libilmimf built with libstdc++v2
added EXRTranslator to the image


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-09 17:48:10 +00:00
Jérôme Duval
6b1fc6fcb7 added a translator for EXR images, based on www.openexr.com
This builds only with GCC 4, mostly because it needs libstdc++ v3


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-03 13:01:23 +00:00
Stephan Aßmus
b91634cbea * extended the jpeg_error_mgr structure to hold the jmp_buf that we need
in the critical error handler. In the high level function, the jmp_buf is
  now allocated on the stack and placed in the "cinfo->err" structure. This
  should make the mechanism thread-safe. Unfortunately, we don't use the
  original libjpeg anymore as is, but this seems to be frozen code since a
  few years anyways. If you have any better suggestions, please don't
  hesitate to mention them! :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-16 15:52:36 +00:00
Stephan Aßmus
dbc936ac13 * it was a really bad idea to invoke exit() on critical errors from an add-on
that only loads bitmaps and is supposed to return a status_t error from
  the Translate() function, especially for people using this in mission
  critical applications.
  The requirements on the error handler that is
  to be installed for the jpeg library are not to return to the calling
  function for critical errors. C++ exceptions seem like the
  natural solution to the problem, but unfortunately, they simply don't
  seem to work, possibly because we are inside an add-on. Ingo had the idea
  to use setjmp() and longjmp() to go directly from the error handler back
  to the top level code and this works. I have implemented this from what
  I understand from reading the opengroup spec, but the compiler currently
  issues a warning. Feel free to fix. The desired effects are achieved though, 
  the translator recovers correctly from broken jpg files now.
  Also, I don't know if the translator should somehow "uninstall" the
  breakpoint. Again, feel free to fix or tell me.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-16 13:28:28 +00:00
Stephan Aßmus
a878b1d91c * remove superfluous tab
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 14:45:04 +00:00
Stephan Aßmus
1185d93240 * patch by vzsolt which really fixes the problem with zero byte buffers
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 12:56:46 +00:00
Stephan Aßmus
a9cde6d274 * this should cover the case where the buffer is one byte long but is _not_
a text file


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 10:29:07 +00:00
Stephan Aßmus
acdf38f663 * fixed a bug researched by Varadi Zsolt Gyula, if the buffer is one byte long
or empty, assume text anyways, fixes Styled Edit opening empty files (#1610)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 10:21:29 +00:00
Stephan Aßmus
92deda607e * removed the Styled Edit Text translator from the "CVS" package for BeOS,
since it doesn't build for BeOS


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 10:19:27 +00:00
Axel Dörfler
516236818d * Fixed two crashing bugs I introduced in JPEG compression code in r20635.
* Also broke big endian 32 to 24 bit conversion.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-01 22:59:11 +00:00
Jérôme Duval
d205506439 we use C for the ppc build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 12:15:30 +00:00
Stephan Aßmus
e31380534b * GCC4 compile fix by Fredrik Ekdahl
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-10 20:29:44 +00:00
Stephan Aßmus
7fc7e14b31 * removed left-over include
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21272 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-29 19:50:26 +00:00
Stephan Aßmus
13eaf8fa00 * fixed one potential leak
* truncated lines to 80 chars


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-29 19:49:23 +00:00
Jérôme Duval
57f13ad210 added a translator for HPGL/2 files based on HPGS. It handles .hp2 files
This builds only with GCC 4, mostly because the code is C99 compliant only


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21209 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-22 22:32:50 +00:00
Jérôme Duval
7a93cf5a82 fix typo
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 19:52:43 +00:00
Axel Dörfler
8b4bb46952 "Ported" wavelet denoising code from dcraw - not tested, probably won't work yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-23 22:23:53 +00:00
Axel Dörfler
82bb12bfd0 Added a setting "raw:half_size" that can be used to reduce the image size by half which greatly speeds up the conversion.
Maybe we should introduce a more generic "preview mode" to the translators that could automatically trigger those things?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-18 12:20:55 +00:00
Axel Dörfler
5878fb7998 Changed the progress monitor protocol to path a basic message that will be sent back
instead of having a fixed message code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-18 12:00:07 +00:00
Axel Dörfler
f13b5de61e * EXIF data is now also parsed in case there was no ioExtension message passed in;
the orientation was only honoured in case there was a message before.
* Disabled error alerts; they are more annoying than helpful.
* Bumped version to 1.2.0.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-12 13:20:33 +00:00
Axel Dörfler
64f5accb3a * Fixed a few large memory holes (Dano even crashes on low memory...).
* Removed printing progress updates to stdout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-11 09:23:33 +00:00
Axel Dörfler
5b91a7be30 Improved progress report, the update message now gets a proper "what" field.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-11 09:10:14 +00:00
Axel Dörfler
646dadb991 Implemented a progress monitor - I'll implement support for this in ShowImage next.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-10 21:12:12 +00:00
Axel Dörfler
9e34f742ae * Now honours the orientation as specified in the EXIF tags; not very well tested, so
it might happen that some rotations don't come out as expected...
* This orientation can be overridden with a special "exif:orientation" setting passed
  via the ioExtension message.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-10 13:36:53 +00:00
Axel Dörfler
ddcd63762f * Now keeps the orientation as defined in EXIF, instead of converting it to something
handy for computation.
* The translator now passes the EXIF orientation to the thumbnail translation using
  a special field "exif:orientation".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-10 13:35:16 +00:00
Axel Dörfler
52e8f46af7 * Now also saves the EXIF data in the supplied message in Translate() (decompress
only, you cannot add EXIF data yet).
* Preparations to honour the orientation of JPEG images stored in the EXIF tags.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20633 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-10 10:54:44 +00:00
Axel Dörfler
8560c78809 Added missing TIFF tag types.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-10 10:52:41 +00:00
Axel Dörfler
1b52d54a31 Now adds a fake TIFF header to the exported EXIF data so that the used endian of the data is known.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-10 00:14:32 +00:00
Axel Dörfler
a238446abb Now puts the EXIF data verbatim into the message passed to Translate().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20626 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-09 22:29:16 +00:00
Ingo Weinhold
ea3f7d3d8d Added an "isExecutable" parameter to the Translator rule. All
translators pass "true" (was used before), but I suppose most of them
don't really need it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-07 01:42:47 +00:00
Axel Dörfler
0663933acc Now also exports the JPEG thumbnails as images using the translator service :-)
Note, this did not work with an older libtranslation.so from Haiku, so it might
also not work correctly on BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 13:31:17 +00:00
Axel Dörfler
ce694927b7 The TIFF translator overwrote the document count before it was clear that it could
handle the image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 13:17:55 +00:00
Axel Dörfler
9468eca38a * Implemented support for the "header only" extension.
* Added missing header when compiling RAWTranslator in test mode for Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 12:15:56 +00:00
Axel Dörfler
b92d0fce7c Rotated images still didn't work correctly; they were offseted.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 12:31:50 +00:00
Axel Dörfler
7e4913f545 * Rotated images did not work correctly.
* Removed ICO specific configuration, added copyright note about the source of this translator.
* Disabled test mode for the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 11:57:33 +00:00
Axel Dörfler
aaea7f1795 Now also supports Canon's CR2 format - note, all images are only opened in half of
their original size for now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20409 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-23 15:30:44 +00:00
Axel Dörfler
8260e407c5 * Initial and very basic version of a RAW image translator.
* Based on Dave Coffin's fabuluous dcraw - it's basically the same thing in C++,
  but follows common sense programming rules a bit more :-).
* Current version probably only supports PENTAX RAW format, though.
* Still lots of places left to clean up.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-22 18:43:45 +00:00