Skip to content

Instantly share code, notes, and snippets.

View symisc's full-sized avatar

PixLab | Symisc Systems symisc

View GitHub Profile
@symisc
symisc / watermark-remove.rb
Created September 24, 2025 17:59
Programmatically remove text and watermarks from input images using the PixLab TXT-REMOVE API endpoint - https://pixlab.io/endpoints/text-watermark-remove-api
require 'net/http'
require 'json'
require 'base64'
require 'uri'
# Programmatically remove text & watermarks from input images using the PixLab BG-REMOVE API endpoint.
#
# Refer to the official documentation at: https://pixlab.io/endpoints/text-watermark-remove-api for the API reference
# guide and more code samples.
@symisc
symisc / watermark-remove.php
Created September 24, 2025 17:59
Programmatically remove text and watermarks from input images using the PixLab TXT-REMOVE API endpoint - https://pixlab.io/endpoints/text-watermark-remove-api
<?php
# Programmatically remove text & watermarks from input images using the PixLab TXT-REMOVE API endpoint.
#
# Refer to the official documentation at: https://pixlab.io/endpoints/text-watermark-remove-api for the API reference
# guide and more code samples.
# Use POST to upload the image directly from your local folder. If your image is publicly available
# then make a simple GET request with a link to your image.
$url = 'https://api.pixlab.io/txtremove';
@symisc
symisc / watermark-text-remove.js
Created September 24, 2025 01:51
Programmatically remove text and watermarks from input images using the PixLab TXT-REMOVE API endpoint - https://pixlab.io/endpoints/text-watermark-remove-api
// Programmatically remove backgrounds from input images using the PixLab BG-REMOVE API endpoint.
//
// Refer to the official documentation at: https://pixlab.io/endpoints/background-remove-api for the API reference
// guide and more code samples.
// Use POST to upload the image directly from your local folder. If your image is publicly available
// then make a simple GET request with a link to your image.
const apiKey = 'PIXLAB_API_KEY'; // PixLab API Key - Get yours from https://console.pixlab.io/
@symisc
symisc / text-watermark-remove.py
Created September 22, 2025 01:15
Programmatically remove text & watermarks from input images using the PixLab TXT-REMOVE API endpoint - https://pixlab.io/endpoints/text-watermark-remove-api
import requests
import json
import base64
import os
# Programmatically remove text & watermarks from input images using the PixLab TXT-REMOVE API endpoint.
#
# Refer to the official documentation at: https://pixlab.io/endpoints/text-watermark-remove-api for the API reference
# guide and more code samples.
@symisc
symisc / remove-background-pixlab-api.rb
Created September 1, 2025 03:12
Programmatically remove backgrounds from input image using the PixLab BG-REMOVE API Endpoint - https://pixlab.io/endpoints/background-remove-api
require 'net/http'
require 'json'
require 'base64'
require 'uri'
# Programmatically remove backgrounds from input images using the PixLab BG-REMOVE API endpoint.
#
# Refer to the official documentation at: https://pixlab.io/endpoints/background-remove-api for the API reference
# guide and more code samples.
@symisc
symisc / remove-background-pixlab-api.php
Created September 1, 2025 03:04
Programmatically remove backgrounds from input image using the PixLab BG-REMOVE API Endpoint - https://pixlab.io/endpoints/background-remove-api
<?php
# Programmatically remove backgrounds from input images using the PixLab BG-REMOVE API endpoint.
#
# Refer to the official documentation at: https://pixlab.io/endpoints/background-remove-api for the API reference
# guide and more code samples.
# Use POST to upload the image directly from your local folder. If your image is publicly available
# then make a simple GET request with a link to your image.
$url = 'https://api.pixlab.io/bgremove';
@symisc
symisc / remove-background-pixlab-api.js
Created September 1, 2025 03:02
Programmatically remove backgrounds from input image using the PixLab BG-REMOVE API Endpoint - https://pixlab.io/endpoints/background-remove-api
// Programmatically remove backgrounds from input images using the PixLab BG-REMOVE API endpoint.
//
// Refer to the official documentation at: https://pixlab.io/endpoints/background-remove-api for the API reference
// guide and more code samples.
// Use POST to upload the image directly from your local folder. If your image is publicly available
// then make a simple GET request with a link to your image.
const apiKey = 'PIXLAB_API_KEY'; // PixLab API Key - Get yours from https://console.pixlab.io/
const apiUrl = 'https://api.pixlab.io/bgremove';
@symisc
symisc / remove-background-pixlab-api.py
Created September 1, 2025 03:00
Programmatically remove backgrounds from input image using the PixLab BG-REMOVE API Endpoint - https://pixlab.io/endpoints/background-remove-api
import requests
import json
import base64
import os
# Programmatically remove backgrounds from input images using the PixLab BG-REMOVE API endpoint.
#
# Refer to the official documentation at: https://pixlab.io/endpoints/background-remove-api for the API reference
# guide and more code samples.
@symisc
symisc / convert-pdf-to-image.js
Created July 18, 2025 18:03
Convert PDF Document to image format using the PixLab PDFTOIMG SDK-Free REST API Endpoint - https://pixlab.io/endpoints/pdftoimg
// Convert PDF Document to image format using the PixLab PDFTOIMG SDK-Free REST API Endpoint
fetch('https://api.pixlab.io/pdftoimg?src=https://www.getharvest.com/downloads/Invoice_Template.pdf&export=jpeg&key=PIXLAB_API_KEY')
.then(response => response.json())
.then(reply => {
if (reply.status !== 200) {
console.log(reply.error);
} else {
console.log("Link to the image output (Converted PDF page): " + reply.link);
}
})
@symisc
symisc / ondemand-pdf-generation-from-markdown.php
Created July 18, 2025 17:55
Programmatically Generate PDF documents from markdown or HTML input suing PixLab's PDFGEN API - https://pixlab.io/endpoints/pdfgen
<?php
# Programmatically Generate PDF document from markdown or HTML input
# Replace with your actual PixLab API key
$api_key = "YOUR_PIXLAB_API_KEY"; // Get yours from https://console.pixlab.io/
# Markdown formatted invoice
$markdown_text = <<<EOD
# Invoice