Scribus Forums

Scribus => Scripts and Plugins => Topic started by: shab.t786 on December 03, 2024, 11:08:34 AM

Title: Image loading using script not showing proper colors
Post by: shab.t786 on December 03, 2024, 11:08:34 AM
I am loading an image using script but the color of the image does not show properly in scribus
Below is the script.
Attached are the images of how it shows in scribus

        image = Image.open(image_path)
        width, height = image.size  # Get image dimensions
       
        # Convert pixels to Scribus points (assuming 72 DPI)
        #width_pts = 40
        #height_pts = 40
        width = 40
        height = 40
        dpi = 300
        width_pts = width * 72 / dpi
        height_pts = height * 72 / dpi
        # Set default position for image
        x_pos, y_pos = -80, 80
       
        # Create and load image into Scribus frame
        image_frame = scribus.createImage(x_pos, y_pos, width_pts, height_pts)
        scribus.loadImage(image_path, image_frame)
        scribus.setScaleImageToFrame(True, True, image_frame)

Title: Re: Image loading using script not showing proper colors
Post by: utnik on December 03, 2024, 02:59:11 PM
can't see the attached files:

utnik