Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Images/JPEG/StringToJPEG Example
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/StringToJPEG Example
This example is the version from Sun, 17th Mar 2012.
Project "StringToJPEG Example.rbp"
FileTypes
Filetype image/jpeg
Filetype image/jpeg2
End FileTypes
Class LoadWindow Inherits Window
EventHandler Sub DropObject(obj As DragItem, action As Integer) do if obj.folderItemavailable then load obj.folderItem end if loop until not obj.nextItem End EventHandler
EventHandler Sub Open() me.acceptFileDrop "image/jpeg" End EventHandler
Sub load(f as folderItem) dim s as string dim b as binaryStream // Read data from file into string b=f.openasbinaryFile(false) if b<>nil then s=b.read(b.length) b.close // Make a picture... backdrop=JPEGStringToPictureMBS(s,true) title=f.displayName end if End Sub
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

See also:

Feedback, Comments & Corrections

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





Links
MBS Xojo Plugins