Re: EncoderTransformation ignored, no errors produced.



Thanks for your reply.

On Mar 14, 6:11 pm, "Michael Phillips, Jr."
<mphillip...@xxxxxxxxxxxxxxx> wrote:
if (vflip) {
// question 2: why is this ignored?
transform = EncoderValueTransformFlipVertical;
encoderParameters->Parameter[2].Guid = EncoderTransformation;
encoderParameters->Parameter[2].Type =
EncoderParameterValueTypeLong;
encoderParameters->Parameter[2].NumberOfValues = 1;
encoderParameters->Parameter[2].Value = &transform;

}

It will fail if the image that you loaded was not a jpeg image.
See:http://msdn2.microsoft.com/en-us/library/ms533845.aspx

I see... I guess I was confused because it silently failed, returning
an Ok status, even though the parameter was not valid.

How can I do what I am trying to do (flip image vertically) without
explicitly creating a second buffer for the image and filling it with
flipped data before creating the CBitmap?

Is there some way I can convert the CBitmap to a JPEG CBitmap in
memory (using the JPEG encoder), then vertically flip that image while
saving it to a file (using the JPEG encoder again -- i.e. separating
JPEG compression and image transformation into two separate steps)?

If I *can* separate it into two separate steps, will that have better
performance than just swapping the image rows before creating the
CBitmap?

Also, is there any specific reason why you'd recommend using GDI+ for
JPEG compression over, say, libjpeg?

Thanks,
Jason
.



Relevant Pages

  • Re: EncoderTransformation ignored, no errors produced.
    ... flipped data before creating the CBitmap? ... memory (using the JPEG encoder), then vertically flip that image while ... JPEG compression and image transformation into two separate steps)? ...
    (microsoft.public.win32.programmer.gdi)
  • EncoderTransformation ignored, no errors produced.
    ... I would also like to use the EncoderTransformation encoder parameter ... and writes out two jpeg files: ... static int GetEncoderClsid ...
    (microsoft.public.win32.programmer.gdi)
  • Re: OT: Why? Using eeePC as digital photo frame with server push...
    ... I suspect at least one JPEG codec still has a quirk when faced with unusually encoded images. ... The PaintShopPro encoder from v8 onwards is actually terminally broken in chroma subsampling but hardly anyone has noticed. ... same size and screen filling on the target screen, ... predictable formats, keeps aspect right. ...
    (sci.electronics.design)
  • Re: OT: Why? Using eeePC as digital photo frame with server push...
    ... 24bit YCC encoded JPEG but gave a completely surreal random false colour ... The PaintShopPro encoder from v8 onwards is ... same size and screen filling on the target screen, ... In Linux the imagemagick program suite is pretty good for most picture ...
    (sci.electronics.design)
  • Re: Jpeg Encoder: YCC Clipping error
    ... I'm a student and I have to write a Jpeg encoder using matlab. ... for me it looks all good but the generated JPEG files are ... subsampling, so the MCU ...
    (comp.compression)