History log of /haiku/src/add-ons/translators/ppm/PPMTranslator.cpp
Revision Date Author Comments
# caf3ea90 28-Sep-2022 Augustin Cavalier <waddlesplash@gmail.com>

Remove unnecessary SetExplicitPreferredSize from translators using layouts.


# 9d617761 22-Mar-2020 X512 <danger_mail@list.ru>

PPMTranslator: fix clang warning self-assign, remove redurant braces

Change-Id: I2b3f61fdf482c56b4520174e7a9c48f4ac64e1f2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2404
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 71aec297 26-Jan-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PPM translator: use a buffer for reading

Reading the file 1 byte at a time from a BFile is very inefficient.
Add a buffer, which makes things a lot faster (parsing a 200x200 image
used to run for a few seconds with 100% CPU use).

Change-Id: Ie2eea819475c9301fbb6102c41fa05ec2d2ca343
Reviewed-on: https://review.haiku-os.org/c/906
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 58913f60 26-Jan-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PPM translator: read 1-bit and greyscale files

Change-Id: I0d9de6cb6eca99a78aada00c5299c16668c414f8
Reviewed-on: https://review.haiku-os.org/c/905
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 5d57984b 26-Jan-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PPM translator: remove pre-R4 support

Change-Id: I26721cdd767bbf0df2936e97a2af322fed49cabf
Reviewed-on: https://review.haiku-os.org/c/904
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 72c5a125 26-Jan-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PPM translator: clang-format

Change-Id: I290f9b369af37d919308759b83c42122f7f309bc
Reviewed-on: https://review.haiku-os.org/c/902
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# f0650dc9 09-Dec-2015 looncraz <looncraz@looncraz.net>

preferences: Convert to using Set*UIColor.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0023-0037 from looncraz, unmodified.


# 3292b902 02-May-2015 Humdinger <humdingerb@gmail.com>

Unify version output ("v" vs "Version", sentence casing.


# 7bfb4a1e 25-Apr-2015 Janus <janus2@ymail.com>

DataTranslations: use layout, standard format.

* Small layout fix.
* Fixes #11999.


# 037bc75e 22-Apr-2015 Janus <janus2@ymail.com>

DataTranslations: use layout, standard format.

* Fix webP, ppm, sgi, tiff, wonderbrush.
* Partialy fixes #11999.


# 1a7bcf69 01-Jun-2014 Oliver Tappe <zooey@hirschkaefer.de>

Lots of B_PRI... insertions to fix errors with DEBUG=1.


# e8eb40f7 12-Aug-2012 Humdinger <humdingerb@gmail.com>

Harmonized translator titles in DataTranslations.


# 7d48219b 10-Jan-2012 Hannah Boneß <hannah@animux.de>

Update layout building code in translators

update layout builder code to new api in:
* src/add-ons/translators/raw
* src/add-ons/translators/exr
* src/add-ons/translators/hvif
* src/add-ons/translators/tga
* src/add-ons/translators/webp
* src/add-ons/translators/gif
* src/add-ons/translators/sgi
* src/add-ons/translators/tiff
* src/add-ons/translators/jpeg
* src/add-ons/translators/jpeg2000
* src/add-ons/translators/ppm

Signed-off-by: Alex Wilson <yourpalal2@gmail.com>


# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# aec33db1 27-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Replace inappropriate usage of strncpy by strlcpy


# 3927bd3c 26-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Prevent string overflow by replacing usage of strcpy by strncpy

CID 8951, CID 10733, CID 10734, CID 10735, CID 10736, CID 10737, CID 10738,
CID 10739


# 10dfe897 06-May-2011 Axel Dörfler <axeld@pinc-software.de>

* Really, there is absolutely no need to pass the default argument to an
optional parameter...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41349 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 70d59669 04-Feb-2011 Siarzhuk Zharski <zharik@gmx.li>

Applied following patches proposed by Jorma Karvonen:
#7135 #7140 #7141 #7145 #7186 #7188 #7191
#7136 #7187 #7184 #7185 #7192 #7138 #7139

with some changes and exclusions:
- all attempts to localize "fprintf(stderr,..." and "printf(..."
replaced by _untranslated_ "syslog(LOG_ERR ...";
- following *Translator.rdef files, that were not added in mentioned patches
were additionally created:
SGI, TIFF, RAW, RTF, PPM, WebP, EXR, STXT, WonderBrush, GIF, TGA;
- some small fixes for consistent catalogs building.

Thank you, Jorma! Please check. ;-)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40357 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bf243977 18-Jan-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Made local variables actually local.
Both JPEGTranslator and JPEG200Translator were "exporting" gSettings symbol,
which when loaded within a app (like Paladin) exporting the same global symbol
was leading to a symbol resolution error. See #7114 for details.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40245 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a76f629e 05-Mar-2010 Ryan Leavengood <leavengood@gmail.com>

Apply patch from Maxime Simon to make several translators use the Layout API.
There are a few small changes from myself, such as adding a copyright for
Maxime in files with bigger changes. Also because this patch was so old I had
to do some manual patching, and added back the title and description on the TGA
and TIFF translators.

I think this improves things a lot, though there is still some work to do to
improve the consistency of the translator settings views.

I think this mostly fixes #2117, though I may leave the ticket open until a few
more things are resolved.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35769 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcc3e627 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdiner:
Changed strings in add-ons to sentence case. This is case-add-ons.diff
from #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35046 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c095606e 03-Nov-2008 Ryan Leavengood <leavengood@gmail.com>

Fixed #3043, which was listed as a ShowImage bug but really was a bug in
several translators which used the incorrect MIME type for the base Be Bitmap
Format. Please when adding translators use image/x-be-bitmap, not just
x-be-bitmap. Though I suppose the if statement in ShowImage could be changed to
only look for x-be-bitmap at the end of the string when filtering, I think this
is the proper fix.

While I was editing the translators I also made the naming more consistant by
adding the translator name in parenthesis after Be Bitmap Format for those that
did not have it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28487 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dc0d6e4c 18-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

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


# ab8e3333 01-Jun-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Removed trailing 'OpenBeos' from translators's names, to be consistent with the rest. Anyone knows why we have two TIFF translators in the tree?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17696 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9949213a 19-Oct-2005 Stephan Aßmus <superstippi@gmx.de>

removed the redundant "translator" from the folder names, fixed some warnings in the JPEG2000Translator

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14449 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3292b90274c44e1485bdb127e31bbbcf80938a6a 02-May-2015 Humdinger <humdingerb@gmail.com>

Unify version output ("v" vs "Version", sentence casing.


# 7bfb4a1eb8a948108737fb3c2ebcf9245a44cfbc 25-Apr-2015 Janus <janus2@ymail.com>

DataTranslations: use layout, standard format.

* Small layout fix.
* Fixes #11999.


# 037bc75e7f1a6c54dc8c0123ef242c4181537ddf 22-Apr-2015 Janus <janus2@ymail.com>

DataTranslations: use layout, standard format.

* Fix webP, ppm, sgi, tiff, wonderbrush.
* Partialy fixes #11999.


# 1a7bcf6962e1c99906cce0fe602e08c3fcda46f6 01-Jun-2014 Oliver Tappe <zooey@hirschkaefer.de>

Lots of B_PRI... insertions to fix errors with DEBUG=1.


# e8eb40f7777e595c44f7148d072fb542c7b49ffa 12-Aug-2012 Humdinger <humdingerb@gmail.com>

Harmonized translator titles in DataTranslations.


# 7d48219b470e22b5147f0ae9adc8ee2049c981d3 10-Jan-2012 Hannah Boneß <hannah@animux.de>

Update layout building code in translators

update layout builder code to new api in:
* src/add-ons/translators/raw
* src/add-ons/translators/exr
* src/add-ons/translators/hvif
* src/add-ons/translators/tga
* src/add-ons/translators/webp
* src/add-ons/translators/gif
* src/add-ons/translators/sgi
* src/add-ons/translators/tiff
* src/add-ons/translators/jpeg
* src/add-ons/translators/jpeg2000
* src/add-ons/translators/ppm

Signed-off-by: Alex Wilson <yourpalal2@gmail.com>


# 546208a53940a26c6379c48a7854ade1a8250fc5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# aec33db178d1475aedf4ee37f385d4c85ed721a3 27-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Replace inappropriate usage of strncpy by strlcpy


# 3927bd3c0d16367eef862660f7b7a5309b66a5a1 26-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Prevent string overflow by replacing usage of strcpy by strncpy

CID 8951, CID 10733, CID 10734, CID 10735, CID 10736, CID 10737, CID 10738,
CID 10739


# 10dfe8970c81ccbcb818dcfcd484c4006aa42d12 06-May-2011 Axel Dörfler <axeld@pinc-software.de>

* Really, there is absolutely no need to pass the default argument to an
optional parameter...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41349 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 70d5966963513ff47a456ba70b7d2eec0f99648d 04-Feb-2011 Siarzhuk Zharski <zharik@gmx.li>

Applied following patches proposed by Jorma Karvonen:
#7135 #7140 #7141 #7145 #7186 #7188 #7191
#7136 #7187 #7184 #7185 #7192 #7138 #7139

with some changes and exclusions:
- all attempts to localize "fprintf(stderr,..." and "printf(..."
replaced by _untranslated_ "syslog(LOG_ERR ...";
- following *Translator.rdef files, that were not added in mentioned patches
were additionally created:
SGI, TIFF, RAW, RTF, PPM, WebP, EXR, STXT, WonderBrush, GIF, TGA;
- some small fixes for consistent catalogs building.

Thank you, Jorma! Please check. ;-)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40357 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bf243977ffd34197ad7c0820c2da5d21abea0402 18-Jan-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Made local variables actually local.
Both JPEGTranslator and JPEG200Translator were "exporting" gSettings symbol,
which when loaded within a app (like Paladin) exporting the same global symbol
was leading to a symbol resolution error. See #7114 for details.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40245 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a76f629efad0ba4d6518d918a39dbcc6097fe536 05-Mar-2010 Ryan Leavengood <leavengood@gmail.com>

Apply patch from Maxime Simon to make several translators use the Layout API.
There are a few small changes from myself, such as adding a copyright for
Maxime in files with bigger changes. Also because this patch was so old I had
to do some manual patching, and added back the title and description on the TGA
and TIFF translators.

I think this improves things a lot, though there is still some work to do to
improve the consistency of the translator settings views.

I think this mostly fixes #2117, though I may leave the ticket open until a few
more things are resolved.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35769 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcc3e627e1aedc4075deb952c66068d542fe9abe 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdiner:
Changed strings in add-ons to sentence case. This is case-add-ons.diff
from #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35046 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c095606e75fe3c978e4749fd2ee5738a44c9af16 03-Nov-2008 Ryan Leavengood <leavengood@gmail.com>

Fixed #3043, which was listed as a ShowImage bug but really was a bug in
several translators which used the incorrect MIME type for the base Be Bitmap
Format. Please when adding translators use image/x-be-bitmap, not just
x-be-bitmap. Though I suppose the if statement in ShowImage could be changed to
only look for x-be-bitmap at the end of the string when filtering, I think this
is the proper fix.

While I was editing the translators I also made the naming more consistant by
adding the translator name in parenthesis after Be Bitmap Format for those that
did not have it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28487 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dc0d6e4c0d65d099bde2def1229b3e9a26f2d937 18-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

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


# ab8e3333372b641f8fc6b545195d54f4a74d006a 01-Jun-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Removed trailing 'OpenBeos' from translators's names, to be consistent with the rest. Anyone knows why we have two TIFF translators in the tree?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17696 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9949213a25979d177b420bc71891c2bff02a331d 19-Oct-2005 Stephan Aßmus <superstippi@gmx.de>

removed the redundant "translator" from the folder names, fixed some warnings in the JPEG2000Translator

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14449 a95241bf-73f2-0310-859d-f6bbb57e9c96