Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Images/Tiff/Huge Tiff
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/Tiff/Huge Tiff
This example is the version from Sun, 17th Mar 2012.
Project "Huge Tiff.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
EventHandler Sub Open() Write read End EventHandler
Sub read() // read big tiff row by row dim f as FolderItem dim t as TiffPictureMBS dim p as PictureMBS f=SpecialFolder.Desktop.Child("test.tif") if f<>Nil then t=new TiffPictureMBS if t.Open(f) then dim row as MemoryBlock dim h as integer=t.Height-1 for i as integer=0 to h row=t.Scanline(i) next t.Close MsgBox "Read TIFF file." end if end if End Sub
Sub write() // write big tiff row by row dim f as FolderItem dim t as TiffPictureMBS dim p as PictureMBS f=SpecialFolder.Desktop.Child("test.tif") if f<>Nil then t=new TiffPictureMBS if t.Create(f) then const PLANARCONFIG_CONTIG=1 const PHOTOMETRIC_RGB=2 const FILLORDER_MSB2LSB=1 const RESUNIT_INCH=2 const ORIENTATION_TOPLEFT=1 const COMPRESSION_NONE=1 ' const x = 20000 // 1.2 GB const x = 30000 // 2.7 GB t.Height=x t.Width=x t.RowsPerStrip=1 t.PlanarConfig=PLANARCONFIG_CONTIG t.Photometric=PHOTOMETRIC_RGB t.BitsPerSample=8 t.SamplesPerPixel=3 t.FillOrder=FILLORDER_MSB2LSB t.Orientation=ORIENTATION_TOPLEFT t.ResolutionUnit=RESUNIT_INCH t.VerticalResolution=72.0 t.HorizontalResolution=72.0 t.Compression=COMPRESSION_NONE dim row as MemoryBlock = NewMemoryBlock(t.Width * 3) dim h as integer=t.Height-1 for i as integer=0 to h t.Scanline(i)=row next t.Close MsgBox "Wrote TIFF file." end if end if End Sub
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins