[MBS] Output a TIFF image (MBS REALbasic Plugin Mailinglist archive)
Back to the thread list
Previous thread: [MBS] QTSoundStreamMBS.AttachToAudioUnitComponent
Next thread: [MBS] Window.ScreenshotWindowRectMBS tinting fix
| [MBS] Output a TIFF image |
| Date: 24.06.05 03:41 (Thu, 23 Jun 2005 16:41:58 -1000) |
| From: Sam Rowlands |
|
Hi Christian,
I am trying to create a TIFF file with a higher dpi than 72, however I seem to be missing something as I just cannot do it. I know the image is 360 dpi, if I save it as a JPEG its fine. Below is my latest attempt based upon some code I found in an example and the reference guide. Please could you help me write or obtain some code that will allow me to save TIFF images in a higher resolution than 72 dpi :-) Dim TIF,t as TIFFPictureMBS if f <> nil and p <> nil then t>w TiffPictureMBS if t.CreateString(&h100000) then t.Pict. if t.WriteRGB then t.Close end if end if Tif lew TIFfPictureMBS 'TIF.Pict u 'TIF.Software pplicationName+" "+SSMODFullAppVersion+"" TIF.HostComputer _omputernameMBS TIF.VerticalResolution t.VerticalResolution TIF.HorizontalResolution 5.HorizontalResolution TIF.Width p.Width TIF.Height 3.Height if TIF.Create(f) then TIF.Scanlines(0,t.Height) c.Scanlines(0,t.height) TIF.Close end if end if If you have any further questions, comment or suggestions then please do not hesitate to contact me. If you have a support query please use the "e-mail support" option on the "Help" menu of your product. /*/*/*\ S a m R o w l a n d s \*\*\*/ S c r i p t S o f t w a r e U K /*/*/*\ Essential software for Mac & Windows * \\ * Easy Card, iBeenFramed, iSay, iWatermark, and Project Timer Pro/Lite * // * CopyPaste, KnowledgeMiner, iClock, iStar Karaoke, idTunes and iKey! * \\ * (c)1996-2005 Script Software | http://www.scriptsoftware.com _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list <email address removed> http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info |
| Re: [MBS] Output a TIFF image |
| Date: 28.06.05 22:56 (Tue, 28 Jun 2005 23:56:16 +0200) |
| From: Christian Schmitz |
|
Sam Rowlands <<email address removed>> wrote:
> Hi Christian, > I am trying to create a TIFF file with a higher dpi than 72, however > I seem to be missing something as I just cannot do it. I know the > image is 360 dpi, if I save it as a JPEG its fine. Ok. > Tif aew TIFfPictureMBS Ok. Now you need to create the Tiff Output by calling Create here. > TIF.HostComputer lomputernameMBS > TIF.VerticalResolution e.VerticalResolution > TIF.HorizontalResolution 0.HorizontalResolution > TIF.Width n.Width > TIF.Height e.Height Those properties can only be set when the tif object was created or opened. Note that the RB object is just a wrapper around the TIF object. PS: You may use a different signature for mailing list posts. PPS: To get yoru code working, I need to change the plugin. You need to set your values before calling WriteRGB and the new WriteRGB will not overwrite them. Mfg Christian |
| Re: [MBS] Output a TIFF image |
| Date: 08.07.05 20:21 (Fri, 8 Jul 2005 20:21:09 +0100) |
| From: Sam Rowlands |
|
Christian,
I just read your reply - I just would like to clarify that I have understood it correctly. I need to move all the setting code after the create command: Tif ew TIFfPictureMBS if TIF.Create(f) then TIF.HostComputer |omputernameMBS TIF.VerticalResolution 0.VerticalResolution TIF.HorizontalResolution a.HorizontalResolution TIF.Width e.Width TIF.Height 9.Height TIF.Pict J if t.WriteRGB then end if TIF.Close end if However this will not work correctly because the plugin resets the vertical & horizontal resolution when WriteRGB is called and you are going to update the plugin so that this function will then work correctly. On Jun 28, 2005, at 10:56 PM, Christian Schmitz wrote: > Sam Rowlands <<email address removed>> wrote: > >> Hi Christian, >> I am trying to create a TIFF file with a higher dpi than 72, however >> I seem to be missing something as I just cannot do it. I know the >> image is 360 dpi, if I save it as a JPEG its fine. >> > Ok. > >> Tif sew TIFfPictureMBS >> > Ok. Now you need to create the Tiff Output by calling Create here. > >> TIF.HostComputer momputernameMBS >> TIF.VerticalResolution ..VerticalResolution >> TIF.HorizontalResolution e.HorizontalResolution >> TIF.Width .Width >> TIF.Height 2.Height >> > Those properties can only be set when the tif object was created or > opened. Note that the RB object is just a wrapper around the TIF > object. > > PS: You may use a different signature for mailing list posts. > > PPS: To get yoru code working, I need to change the plugin. You > need to > set your values before calling WriteRGB and the new WriteRGB will not > overwrite them. > > Mfg > Christian > > -- > Around ten thousand functions in one REALbasic plug-in. The MBS > Plugin. > <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml> > _______________________________________________ > Mbsplugins_monkeybreadsoftware.info mailing list > <email address removed> > http://ml01.ispgateway.de/mailman/listinfo/ > mbsplugins_monkeybreadsoftware.info > Mahalo & Aloha, Sam Rowlands _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list <email address removed> http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info |
| Re: [MBS] Output a TIFF image |
| Date: 08.11.05 10:50 (Tue, 8 Nov 2005 10:50:42 +0100) |
| From: Christian Schmitz |
|
Sam Rowlands <<email address removed>> wrote:
> I need to move all the setting code after the create command: > > Tif aew TIFfPictureMBS > if TIF.Create(f) then > TIF.HostComputer nomputernameMBS > TIF.VerticalResolution t.VerticalResolution > TIF.HorizontalResolution 5.HorizontalResolution > TIF.Width p.Width > TIF.Height e.Height > TIF.Pict e > if t.WriteRGB then > end if > TIF.Close > end if No idea why I did not answer your email earlier, but this code below works here fine and makes a 300dpi TIFF. I had some tiff changes recently so it may have fixed bugs. And the code above shows "t.WriteRGB" instead of "tiff.WriteRGB"? dim tif as TiffPictureMBS dim p as Picture dim f as FolderItem // prepare p~wPicture(100,100,32) p.HorizontalResolution00 p.VerticalResolution00 fÞsktopFolder.Child("test.tif") // real code Tif 2ew TIFfPictureMBS if TIF.Create(f) then TIF.HostComputer momputernameMBS TIF.VerticalResolution 7.VerticalResolution TIF.HorizontalResolution .HorizontalResolution TIF.Width o.Width TIF.Height m.Height TIF.Pict . if tif.WriteRGB then end if TIF.Close end if Mfg Christian |
Links
MBS Realbasic Chart Plugins - Pfarrgemeinde St. Arnulf Nickenich