2/26/2023 0 Comments Perfectly clear presetsProcessing of the image caused errors check further details under 'error'. Make sure the volume or machine has enough capacity or permissions. The /output partition is full or not writable Make sure to mount the correct preset directory under /presets and the preset is there or correct the calling codeĬouldn't create temporary file for output The preset has not been uploaded or mounted Make sure /input inside the container is writable and the machine has enough HDD Probably wrongly encoded by the user or too much RAM pressure on your containerĬouldn't create temporary file for input image The request image itself couldn't be extracted Use a valid error level: 'Debug', 'Info', 'Warning', 'Error' (case insensitive)Īn user sent a request with an unsuported header Used for states that cannot be solved through code and need manual intervention. Warning: might be a problem but doesn't need immediate attention.Info: default logging level - reports basic usage information.Debug: for information useful while first deploying, it's used to log an incoming request and its procesing even if no errors occur.Server side logs divide into 4 different severity levels: It's configured to use json formating for easy parsing in case it's needed. As such it supports the same logger levels under the environment variable PFC_LOG_LEVEL. The server uses the logrus logger package. Listen address: the server inside the container listens to 0.0.0.0:80. Sets the logging level to one of: debug, info, warning, error. Set PFC_AVX to "on", "off" or "auto" (default) which detects if AVX is available and uses it. The container can make use of AVX instruction set to improve performance, if available. The face aware exposure algorithm has a fast but less accurate setting that can be toggled on using the PFC_USE_FASTFAE setting. Set the URL to direct the clients to download the Image from. These can be set when calling the docker run command, for example with: -e PFC_LOG_LEVEL='debug'. The following environment variables will affect the behavior of the application. There are three ways to configure and influence how this docker solution operates. These are very similar to the correct_image.sh script, but show the process to convert from JPG to PNG and also There are two other scripts included in this package - convert_image.sh and scale_image.sh. ImageKey=$(curl -H "Content-Type: image/jpeg" -X PUT " -upload-file sample.jpg | jq -r '.imageKey')Ĭorrect the image with the default preset:ĬorrectedImageUrl=$(curl -v -X GET " | jq -r '.corrected_url')Ĭurl "$" -o corrected.jpg Upload an image and parse and save the imageKey: It has mounted the presets directory to /presets and the sdk_license folder to The container is now running attached and in debug mode to inspect everything is properly setup. p 80:80 -e PFC_LOG_LEVEL='debug' pfc_container Run the imported image: docker run -it -v "$(shell pwd)/presets":/presets -v "$(shell pwd)/sdk_license":/sdk_license \ Verify that your license files are the sdk_license folder.Īdd the docker image to your docker engine:ĭocker load -input pfc_container_image.tar You can run make in this folder to load the docker image, run the container, and upload, correct and download a sample JPEG image. We have provided a simple script to demonstrate the API. Only accepted for JPEG and ignored for any other output types. Chosen dimension of the output image in pixels. Either 'JPEG' or 'PNG' - used to set the type of file returned. ID of uploaded image, as returned from the PUT method If you need the corrected image again after this time, you'll need toĪpply Perfectly Clear image correction and get the URL to download the corrected image. The original and corrected images will be stored for at least 12 hours, and no more that 24 hours. Download the corrected image and use in your applications.GET method with return the URL of the corrected Optionally, provide the name of the Preset to apply when correcting the image, and the type of image you want (JPG or PNG) or image resizing parameters. Call the GET method with the imageKey of the image you want to correct.Upload a JPEG or PNG image to be corrected using the PUT method.Once the container is running, you will interact with it via a HTTP API, through the process: The container will mount two volumes - one containing presets to use when applying Perfectly Clear, and a second containing your SDK license key. This document will explain how to get our Docker container up and running, how to configure it, and how to use the logging facility to diagnose any issues you might encounter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |