You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Images/LargePicture/
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control Canvas1 Inherits Canvas
ControlInstance Canvas1 Inherits Canvas
End Control
Control PushButton14 Inherits PushButton
ControlInstance PushButton14 Inherits PushButton
EventHandler Sub Action()
dim f as FolderItem
f=GetopenFolderItem(FileTypes.Png)
if f<>Nil then
Current=nil
dim p as new PNGReaderMBS
if p.OpenFile(f) then
if p.ApplyOptions(0) then
Current=new PictureMBS(p.Width,1000,PictureMBS.ImageFormatRGB)
dim i,c as integer
// ignore 4500 lines
for i=1 to 4500
call p.ReadRow()
next
// read next 1000 lines
for i=0 to 999
Current.RowInFormat(i, PictureMBS.ImageFormatRGBA)=p.ReadRow()
next
// display with x=7000
Canvas1.Backdrop=current.CopyPicture(7000,0,1000,1000)
end if
end if
end if
End EventHandler
End Control
EventHandler Sub Close()
quit
End EventHandler
EventHandler Sub Open()
self.Maximize
End EventHandler
Property Current As PictureMBS
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar