Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

CombineBitCMYKtoRGBMBS(CyanChannel() as Integer, MagentaChannel() as Integer, YellowChannel() as Integer, BlackChannel() as Integer, Files() as FolderItem, scale as Double, width as Integer, height as Integer, X1 as Integer, Y1 as Integer, X2 as Integer, Y2 as Integer, byref output as picture, CacheSizeRead as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method TIFF MBS Tiff Plugin 6.0 Yes Yes Yes No No
Function: Combines 1bit raw image files to one 8bit RGB tiff.
Example:
dim t(4) as FolderItem
dim dC(4), dM(4), dY(4), dK(4) as Double
dim nC(4), nM(4), nY(4), nK(4) as Integer
dim i as Integer
dim p as Picture

//Cyan
dK(0)=0.0
dC(0)=1.0
dM(0)=0.0
dY(0)=0.0
//Magenta
dK(1)=0.00
dC(1)=0.0
dM(1)=1.0
dY(1)=0.0
//Yellow
dK(2)=0.00
dC(2)=0.0
dM(2)=0.0
dY(2)=1.0
//Black
dK(3)=1.00
dC(3)=0.0
dM(3)=0.0
dY(3)=0.0
//Pantone, Sonderfarbe, S0
dK(4)=0.00
dC(4)=0.60
dM(4)=0.35
dY(4)=0.15

//Bilder
t(0)=GetFolderItem("test.Cyan.bit")
t(1)=GetFolderItem("test.Magenta.bit")
t(2)=GetFolderItem("test.Yellow.bit")
t(3)=GetFolderItem("test.Black.bit")
t(4)=GetFolderItem("test.S0.bit")

for i=0 to 4
nC(i)=dC(i)*1000.0
nM(i)=dM(i)*1000.0
nY(i)=dY(i)*1000.0
nK(i)=dK(i)*1000.0
next

// Scale 1/n, 1/3, 1/2, 1, 2, 3, n

Title=str(CombineBitCMYKtoRGBMBS(nC,nM,nY,nK, t, 1, 545,567,0,0,545,567,p,0))
Backdrop=p
Width=p.Width
Height=p.Height
Notes:
All arrays have the same size specifying for each 1bit grayscale source image the colors to be used in the final image.
Result image is written to the output picture which is created. Error code is returned which is 0 for no error.
CacheSize can be set to a value greater than 0. And it may make the process faster or slower depending on what you do.

Feedback, Comments & Corrections

TIFFStringToPictureMBS(data as string) as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method TIFF MBS Tiff Plugin 6.2 Yes Yes Yes Yes No
Function: Opens a tiff string and returns the RGB image for this tiff file.
Notes:
Returns nil on any error.

This function works with most Tiff formats, but has problems with some like 16 bit CMYK.

Some examples using this method:

Some FAQ entries about this method:

Feedback, Comments & Corrections

TIFFStringToTiffPictureMBS(data as string) as TiffPictureMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method TIFF MBS Tiff Plugin 6.2 Yes Yes Yes Yes No
Function: Opens a tiff string and returns a TiffPictureMBS object.
Notes:
if you want to read the picture after this line you need to call ReadBW, ReadRGB or use the Scanline methods.
Returns nil on any error.

Some FAQ entries about this method:

Feedback, Comments & Corrections

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




Links
MBS Xojo PDF Plugins