ScreenPro Linux Developer Guide
Overview
ScreenPro for Linux contains the following components:
- libScreenPro.so
- ScreenPro API header file
- Sample screens
This document aims to describe these components and how they can be used within a custom application.
This documentation is written for ScreenPro v3.1.0. If you encounter differences with an older version you are using, and do not have the documentation originally released with it in PDF format, please contact us at screenpro-support@globalgraphics.com.
ScreenPro Library
The ScreenPro Library (libScreenPro.so
) exposes a low-level C API that allows application developers to add ScreenPro screening to their applications and workflows.
The default path for the libScreenPro.so
is:
./libScreenPro.so
The header by default is found at:
./ScreenPro.h
The ScreenPro.h
header is required to use the ScreenPro Library.
The header contains the low-level C API for ScreenPro.
Requirements
The following packages are required to build an application with the ScreenPro Library:
- gcc
- g++
- make
- libtiff5-dev
- libexpat1-dev
All can be installed on Ubuntu 14.04 LTS (64 Bit) and above using the following command:
sudo apt-get install <module name>
where <module name>
is taken from the above list.
Documentation
An extensive set of documentation is found in each header file, detailing the functionality of the API and structures.
An example implementation
The following illustrates how the ScreenPro.dll can be used in a screening application:
- Start the ScreenPro engine.
ScreenProStartup(...);
This step initiates the ScreenPro engine and validates licenses as appropriated. You can also hook an IO handler in this API to handle more complex IO (for example, filenames in UTF16 encoding, or in-memory screen data). - Screening. This step performs the main screening functionality. It should be run by each thread.
Screen the image based on the given ScreenSet folder. This carries out the main screening function:ScreenProScreen(…);
- Shut down ScreenPro. This step shuts down the ScreenPro engine and frees all reserved resources.
ScreenProShutdown(…);
Input
The following input is accepted:
TIFF (Single channel, continuous tone, 8 or 16 bits per pixel respectively).
Output
The following output is created:
TIFF (Preview quality, single channel, screened, 8 bits per pixel, compressed).
Screens
ScreenPro is supplied with sample screens featuring 1, 2, 3, and 4 droplet sizes. See your technical representative for more details.
Sample application
ScreenProLinux.ExampleApplication.zip
Building
Edit the MakeFile and confirm that the CC: flag equals gcc
1. ELF:=ScreenProExample
2. CC:=gcc
3. CFLAGS:= -g -fPIC -fpermissive
4. LINKFLAGS:= -rdynamic -ldl -1m
Edit ScreenProDll.Example.cpp
to add the password and license on lines 420 and 421 respectively supplied by Global Graphics.
// Load ScreenPro library and retrieve all exports
void* libHandle = getFunctionsPointers();
printf("It gets here before there");
ScreenProPermit permit =
{ const_cast<char*>("Enter License Here"), // Replace with license key if you have one.
const_cast<char*>("Password Here"), // Replace with password if you have one.
1, // Replace with number of outboard boards if you wish.
nullptr, // Replace with OEMId
Also, go to the top of the document and make sure the dlopen parameter, where you enter the location of the libScreenPro.so
file, is correct.
-{
-#ifdef _WIN32
return static_cast<void*>(LoadLibraryA("ScreenPro.dll"));
#else
void *f = dlopen("./libScreenPro.so", RTLD_NOW);
if ( f == NULL )
fprintf(stderr, "dlopen() failed: %s\n", dlerror());
return f;
To build the example, open up a terminal inside the directory where the makefile is and type make
.
Ensure that the LD_LIBRARY_PATH is set correctly to include the location of the libScreenPro.so
. For example:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ScreenPro
Command line
Before you run the following command, make sure the TIF file to be screened is in the same directory as your example application binary:
./ScreenProExample <ScreenPath> <Channel> <XOffset> <YOffset> <TIFF input file>
Where
| Full path to the screen directory |
| Cyan: |
| X tile offset value (used for chameleon or mirrorpearl only) |
| Y tile offset value (used for chameleon or mirrorpearl only) |
| The tiff file to screen in color separated 8bit contone |
for example:./ScreenProExample Screens/1drop_mirror_example 0 0 0 jobname_1_cyan.tif
./ScreenProExample Screens/1drop_pearl_example 3 8 15 jobname_1_black.tif
OEM licensing
When developing a solution using the ScreenPro SDK, the responsibility for security is on the developer. We provide a mechanism that is required to be populated in order to use the API, but ultimately other than the license and password that we supply to you, the remaining parameters are open to your custom entries.
The ScreenProPermit structure is a C Struct that is used to communicate the required licensing information so that we can sufficiently restrict use of the API.
ScreenProPermit permit =
{
nullptr, // Replace with license key.
nullptr, // Replace with password.
0, // Replace with number of output boards.
nullptr, // Replace with OEMId
};
The OEM ID is only required when using PrintFlat calibrations and/or NozzleOut compensation functionality.
Copyright © 2021 Global Graphics Software Ltd. All Rights Reserved.
Global Graphics Software Ltd | Global Graphics KK |
Harlequin, the Harlequin logo, Harlequin RIP, Harlequin ScreenPro are trademarks of Global Graphics Software Limited, which may be registered in certain jurisdictions. Global Graphics Software is a registered trademark of Global Graphics SE. All other brand and product names are the registered trademarks or trademarks of their respective owners. Global Graphics makes no warranty and accepts no liability.