ChangeLog | 10 ++++++++++
oln/io/write_image_pnm_2d.hh | 4 ++--
2 files changed, 12 insertions(+), 2 deletions(-)
Index: olena/ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Fix PBM (binary) image writing.
* oln/io/write_image_pnm_2d.hh (write_pnm_bin::extra_work): Rename
as...
(write_pnm_bin::impl_extra_work): ...this.
(write_pnm_bin::impl_write_point): Swap written value, as
specified in the PBM specification (1 for black, 0 for white).
Index: olena/oln/io/write_image_pnm_2d.hh
--- olena/oln/io/write_image_pnm_2d.hh (révision 233)
+++ olena/oln/io/write_image_pnm_2d.hh (copie de travail)
@@ -107,7 +107,7 @@
int offset;
char v;
- void extra_work()
+ void impl_extra_work()
{
if (offset != 7)
{
@@ -125,7 +125,7 @@
offset = 7;
v = 0;
}
- if (this->input[this->p] == value_type(1))
+ if (this->input[this->p] == value_type(0))
v |= 1 << offset;
offset--;
}
Show replies by date