[mono-vb] Rotating Images

Rolf Bjarne Kvinge rolflists at ya.com
Wed Sep 9 08:08:02 EDT 2009


Hi,

Please file a bug report in bugzilla.novell.com with a complete (compilable)
test case.

Rolf

> -----Original Message-----
> From: mono-vb-bounces at lists.ximian.com [mailto:mono-vb-
> bounces at lists.ximian.com] On Behalf Of Easy_Rider9999
> Sent: domingo, 16 de agosto de 2009 11:42
> To: mono-vb at lists.ximian.com
> Subject: [mono-vb] Rotating Images
> 
> 
> The following Code works with .Net framework, but not with Mono! What
> is
> wrong:
> 
> Friend Sub RotateImg(ByRef pic As Image, ByVal FileName As String,
> ByVal
> Value As EncoderValue, Optional ByVal BakUpFileName As String = "",
> Optional
> ByRef p As Imaging.PropertyItem = Nothing)
>     'Dim pic As Image
>     Const Codeloc As String = ClassName & ".RotateImg"
>     gStatus = Codeloc & " Start"
> 
>     Dim Enc As Encoder = Encoder.Transformation
>     Dim EncParms As EncoderParameters = New EncoderParameters(1)
>     Dim EncParm As EncoderParameter
>     Dim CodecInfo As ImageCodecInfo =
> LibPhotoPrinter.clsGrafics.GetEncoderByExt(IO.Path.GetExtension(FileNam
> e))
> 
> 
>     '// load the image to change
>     'pic = Image.FromFile(FileName)
> 
> 
> 
> 
>     EncParm = New EncoderParameter(Enc, Value)
>     EncParms.Param(0) = EncParm
>     If p Is Nothing = False Then
>       p.Value = BitConverter.GetBytes(CShort(1))
>       pic.SetPropertyItem(p)
>     End If
>     gStatus = Codeloc & " Save file " & FileName & " CodecInfo " &
> CodecInfo.ToString & " Parms " & EncParm.ToString
>     pic.Save(FileName, CodecInfo, EncParms)
> 
>   End Sub
> 
> 
> Regards Hans
> --
> View this message in context: http://www.nabble.com/Rotating-Images-
> tp24991859p24991859.html
> Sent from the Mono - VB mailing list archive at Nabble.com.
> 
> _______________________________________________
> Mono-vb mailing list
> Mono-vb at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-vb



More information about the Mono-vb mailing list