Xojo Conferences
MBSOct2019CologneDE

Platforms to show: All Mac Windows Linux Cross-Platform

/Images/JPEG/Test on damaged JPEGs
Function:
Required plugins for this example: MBS Images Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Images/JPEG/Test on damaged JPEGs
This example is the version from Mon, 5th May 2019.
Project "Test on damaged JPEGs.rbp"
Class Window1 Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control Timer1 Inherits Timer
ControlInstance Timer1 Inherits Timer
EventHandler Sub Action() dim j as JPEGImporterMBS j=new JPEGImporterMBS j.Data=leftb(data,lenb(data)*rnd+1) j.AllowDamaged=true j.Import p=j.Picture Canvas1.Invalidate Exception End EventHandler
End Control
Control Canvas1 Inherits Canvas
ControlInstance Canvas1 Inherits Canvas
EventHandler Sub Paint(g As Graphics, areas() As REALbasic.Rect) g.ClearRect 0, 0, g.Width, g.Height if p <> nil then g.DrawPicture p, 0, 0 end if End EventHandler
End Control
EventHandler Sub Open() dim p as Picture dim s as string p = new Picture(100,100,32) p.Graphics.ForeColor=rgb(255,0,0) p.Graphics.FillRect 0,0,100,100 s=PictureToJPEGStringMBS(p,100) data=s End EventHandler
Property Protected data As string
Property Protected p As Picture
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Images Plugin.

The biggest plugin in space...




Links
MBS Xojo Plugins