xmlreporting-servicesreportbuilderrdl

rotate hex image in report builder


I want to rotate the image I converted from hex image to png in a picturebox in Report Builder by 90 degrees. I couldn't find any way through my research. Can you help me?

Here s my picturebox properties;

Picture box fx

1

And if i can, i can change xml code in behind, if u tell me how can give rotate angle to my image tag. Like this;

Image xml codes

2

How will i give 90 degree rotate to picturebox?


Solution

  • you can use a function to rotate the image and call the function from your image value

    see: https://learn.microsoft.com/en-us/dotnet/api/system.drawing.rotatefliptype?view=netframework-4.8

    Public Function EditImage(ByVal picbytes as Byte()) as Byte()
    
        Dim ms as System.IO.MemoryStream = Nothing
        Dim rms as System.IO.MemoryStream = Nothing
        Dim bm as System.Drawing.Bitmap
    
        ms = new System.IO.MemoryStream(picbytes, 0, picbytes.Length)
        bm = new System.Drawing.Bitmap(ms)
    
            ' Image manipulation code will go here
        bm.RotateFlip(System.Drawing.RotateFlipType.Rotate270FlipNone)
    
        rms = new System.IO.MemoryStream()
        bm.Save(rms, System.Drawing.Imaging.ImageFormat.Jpeg)
    
        Return rms.ToArray()
    End Function
    

    enter image description here