Opened 9 years ago

Closed 6 years ago

#3003 closed defect (fixed)

wxPixelData<wxImage> won't build (if used that is)

Reported by: lmfe Owned by:
Priority: normal Milestone:
Component: GUI-all Version:
Keywords: wxImage wxPixelData Cc: lmfe
Blocked By: Blocking:
Patch: yes

Description

wxPixelData<wxImage> won't build; tested under MSVC6;
patch to CVS provided in attachment

It seems that there are two bugs in the code of the
wxImage specialization of wxPixelData, under wx/rawbmp.h

  1. At the wxPixelData declaration:

--
template <class Image, class PixelFormat =
wxPixelFormatFor<Image> >
--
should be:
--
template <class Image, class PixelFormat =
wxPixelFormatFor<Image>::Format >
--

  1. At the definition of the constructors of

wxPixelDataOut<wxImage>::wxPixelDataIn<dummyPixelFormat>
the code references Iterator::SizePixel, and should
have been Iterator::PixelFormat::SizePixel.

  1. This is a minor consistency bug. The comments in

wxPixelDataOut<wxImage>::wxPixelDataIn<dummyPixelFormat>::Iterator
says that dummyPixelFormat is not used, and in fact it
is (for the definition of ChannelType). I also agree
that it makes no sense using it, and I defend making a
reference to PixelFormat instead.

Attachments (1)

rawbmp.patch download (1.7 KB) - added by lmfe 9 years ago.
patch against CVS (09-01-2006)

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by lmfe

patch against CVS (09-01-2006)

comment:1 Changed 7 years ago by wojdyr

  • Component set to GUI-all
  • Keywords wxPixelData added
  • Patch set

Thanks. Is the patch still relevant?

comment:2 Changed 6 years ago by vadz

  • Resolution set to fixed
  • Status changed from new to closed

Yes, the patch is still relevant and it's really a pity that we didn't notice it all these years ago because it was submitted as a bug and not a patch :-(

Anyhow, I've applied it now (r53852), thanks!

Note: See TracTickets for help on using tickets.