Re: EncoderTransformation ignored, no errors produced.
- From: "jason.cipriani@xxxxxxxxx" <jason.cipriani@xxxxxxxxx>
- Date: Fri, 14 Mar 2008 22:01:24 -0700 (PDT)
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
.
- Follow-Ups:
- Re: EncoderTransformation ignored, no errors produced.
- From: Michael Phillips, Jr.
- Re: EncoderTransformation ignored, no errors produced.
- References:
- EncoderTransformation ignored, no errors produced.
- From: jason.cipriani@xxxxxxxxx
- Re: EncoderTransformation ignored, no errors produced.
- From: Michael Phillips, Jr.
- EncoderTransformation ignored, no errors produced.
- Prev by Date: Re: EncoderTransformation ignored, no errors produced.
- Next by Date: Re: EncoderTransformation ignored, no errors produced.
- Previous by thread: Re: EncoderTransformation ignored, no errors produced.
- Next by thread: Re: EncoderTransformation ignored, no errors produced.
- Index(es):
Relevant Pages
|