LibreOffice Impress converts vector images to raster images

I am using LibreOffice Impress on Arch Linux / Gnome and my problem is that Impress converts my vector images to blurry low resolution rastered images when changing and saving an existing .pptx file. Exporting the presentation to PDF preserves the vector images but only when the .pptx has not been closed and opened again in the meantime.

How can I get Impress to keep my vector images intact and not raster it on save?

node.js – Bulk Convert Entire Folder of Images with sharp

I have a project where I need to bulk convert large amounts of .png files to .jpgs, with some control over compression quality. Using the node module sharp works like a charm on individual files, e.g.:

const sharp = require("sharp");

  .jpeg({ quality: 70 })

But I have hundreds of files I need to convert at a shot. I had hoped to be able to use some wildcard for files, like:

  .jpeg({ quality: 70 })

though that of course doesn’t work, nor has any attempt I’ve done to loop through all the files, or using the node module glob. Appreciate any guidance that can be provided here.

mediawiki – wikipedia/wikimedia – retrieve images with custom resolution

I am scraping wikipedia for images and an url for images has the format as follows:

I went through the documentation and etc. but could not find a way how to retrieve given image in smaller size.

Does there exist a way how to get wikipedia/wikimedia images in smaller size through http (based on original url)?
(I am talking about getting the image already resized from the source, not resizing after download )

mediawiki – wikimedia – retrieve images with custom resolution

I am scraping wikipedia urls for images and an url for images has the format as follows:

I went through the documentation and etc. but could not find a way how to retrieve given image in smaller size.

Does there exist a way how to get wikipedia/wikimedia images in smaller size through http (based on original url)? (I am talking about getting the image already resized from the source, not resizing after download )

In case Mr. @StephenOstermiller see this, I am asking because I am using these images on the website and its the CLIENT that downloads the image. Therefore, the larger the image, the lower the performance of the website.

theming – How to use Blazy in a custom Twig with Responsive Images and WebP

I have a node twig template and I’m rendering Responsive images like so:

{% set pmpFact1Path = node.field_pmp_fact1_image.entity.uri.value %}

    set pmpFact1ResponsiveImageStyle = {
        '#theme': 'responsive_image',
        '#responsive_image_style_id': 'pmp_facts',
        '#uri': pmpFact1Path,
        '#attributes': { class: 'img-responsive pmp-vtwo-facts-1-img', alt: 'NEIU Students' },

{{ pmpFact1ResponsiveImageStyle }}

I have my breakpoints.yml set and my responsive image and image styles are configured through the interface.

I’ve got the WebP module installed and all of this is working beautifully.

Now I want to lazy load my responsive images.

To that end I’ve tried several different incarnations of this:

{% set pmpFact1Path = node.field_pmp_fact1_front_image.entity.uri.value %}

    set pmpFact1ResponsiveImageStyle = {
        '#theme': 'blazy',
            'lazy': 'blazy',
            '#uri': pmpFact1Path,
            '#responsive_image_style_id': 'pmp_facts'
        '#item_attributes': { class: 'b-lazy img-responsive media media--blazy media--loading media--responsive media--image pmp-vtwo-facts-1-front-img', alt: 'Students' },
        '#uri': pmpFact1Path,
        '#responsive_image_style_id': 'pmp_facts',
        '#attached': {'library': ('blazy/load')}

I’m using blazy 2.2.
I’ve configured it to work with responsive images via the interface.
I’ve also set the field format to blazy and applied the responsive image style in the field settings.
I’ve got the blazy library (blazy.min.js and blazy.js) in my libraries directory well.

The result is I get the blue square place holder flipping endlessly but no image or picture tag srcset markup. i.e.:

<div class="media--blazy media--loading is-b-loading media--image">        

From what I’ve read, this could mean I’m not successfully loading the blazy javascript file. I’ve tried requiring it as a dependency in my libraries.yml but that did nothing.

If anybody could offer some advice I’d appreciate it very much.

python – how to concatenate two images and remove duplicated pixels in the intersection

if I have for example two tabular images :

tabular image 1

tabular image 2

I want to concatenate them to get an entire table without duplicated pixels or lines, you can see that there is a duplicated line between the intersection of the two tables in the

output image

# this is code to concatenate two image files :
file1 = "path/to/your/tabular_image_1"
file2 = "path/to/your/tabular_image_2"
import cv2
im_v = cv2.vconcat((cv2.imread(file1), cv2.imread(file2)))

unity – Get all images from peristent data path and save them to a Texture2D array

So i managed to make a working script that downloads images from firebase in this situation and saves them to Application.persistentDataPath. Now what i would like help in doing is getting all those images “*jpg” and assigning them to a Texture2D array for later use.

So far i have mananged to open one of those images by name and assign it to a single texture.

    public Texture2D image;

 private void Awake()
        string dirname = "levelNature";
        string path = Application.persistentDataPath + "/" + dirname + "/" + "nameofImage.jpg";


    private void LoadSprite(string path)
        if (string.IsNullOrEmpty(path)) 
            Debug.Log("null or empty");

        if (File.Exists(path))
            byte() bytes = File.ReadAllBytes(path);
            Texture2D texture = new Texture2D(1024, 1024, TextureFormat.RGB24, false);
            image = texture;

With just one image i can assign it to a texture but since later on in the gameplay i’m using a texture2d array to assign those images to the gameplay , which now are set through the inspector , i would like to load all images in a particular folder to a Texture2D array which later on i will be using to show each image index in a specific level.

I did try it out like this but it isn’t successful.

    public Texture2D() source;

        var fileNames = Directory.GetFiles(Application.persistentDataPath + "/" + dirname + "/" + "*.jpg");

        source = new Texture2D(fileNames.Length);
        int index = 0;
        foreach (var fileName in fileNames)
            source(index) = LoadSprite(fileName); // i get the error here that it cant convert void to texture2D

Hopefully once all images are loaded i could see in that array in the inspector all the images and then use that for the rest of the game. Thank you!

mod rewrite – Verify 2 cookies with mod_rewrite before serving images

I have the following mod_rewrite rule, which works fine in my Apache 2.x on CentOS 6 Linux machine, but it is not complete:

RewriteCond %{HTTP_COOKIE} !id
RewriteCond %{REQUEST_URI} ^/sites/default/files/pictures/picture-
RewriteRule .* /images/dummy.png (L)

because I’m trying to change it in 2 ways:

  1. Actually 2 cookies (and not just 1 as above) should be present: id and auth (but I don’t know, how to do (X or Y) and Z with mod_rewrite)

  2. I’d like to verify that the value of the auth cookie is a 32 hex chars string (an MD5 hash) and that the value of id cookie is numeric.

The background is that I’ve gotten a bill for EUR 1000,- from Getty
Images, because one of the Drupal users on my server has supposedly used their picture as an avatar. I’m not looking for any lawyer or pseudo-lawyer advice here, just for the way to display a dummy image instead of real user pictures to web crawlers.

And yes, I’ve noticed in the mod_rewrite doc, that I could pass the cookie values to an external script through mod_rewrite (for verifying the MD5 hash), but I’d like to tackle this later.


I’ve come up with the following

RewriteCond %{REQUEST_URI} ^/sites/default/files/pictures/picture-
RewriteCond %{HTTP_COOKIE} !auth=(a-fA-F0-9){32} (OR)
RewriteCond %{HTTP_COOKIE} !id=(0-9)+
RewriteRule .* /images/dummy.png (L)

but I’m not sure, if the above RewriteCond‘s act as X and (Y or Z) or (X and Y) or Z

HomeWork Help: populate images into Grids java

I need help with my homework,i have a class that draws grids on a jframe window. I need a method that will let me draw an image on a grid i choose using the index of a grid in the parent layout. Here is what my code draws so far on a window…Accessing a single grid element in the layout is all i want then from there, set i will add an image resource with JPanel object.. The icon i intend to draw on a single grid is this..

enter image description here
The code i used to achieve that is here

public class Grids extends Frame {
         * Construct a GfxDemo2 given its title, width and height. Uses a
         * GridBagLayout to make the Canvas resize properly.
         //this is the image resource in intend to fill in a single grid but i have
        String red_diamond="red-diamond.jpg";
        ImageIcon p = new ImageIcon(this.getClass().getResource(red_diamond));

        Grids(String title, int w, int h, int rows, int cols) {

            // Now create a Canvas and add it to the Frame.
            GridsCanvas xyz = new GridsCanvas(w, h, rows, cols);

            addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {

            // Normal end ... pack it up!

        public static void main(String() a) {

            Grids mygrids=new Grids("Grids",300,300,6,6);
            //method to fill the grid with the image defined in the class

class GridsCanvas extends Canvas {
    int width, height;

    int rows;

    int cols;

    GridsCanvas(int w, int h, int r, int c) {
        setSize(width = w, height = h);
        rows = r;
        cols = c;

    public void paint(Graphics g) {

        int i;
        width = getSize().width;
        height = getSize().height;

        // draw the rows
        int rowHt = height / (rows);
        for (i = 0; i < rows; i++)
            g.drawLine(0, i * rowHt, width, i * rowHt);

        // draw the columns
        int rowWid = width / (cols);
        for (i = 0; i < cols; i++)
            g.drawLine(i * rowWid, 0, i * rowWid, height);


unity – Retrieving an array of images from Firebase Storage

As title says I’m trying to get all images on firebase storage and save them to an array which later on i will be using to load them into the scene. i can manage downloading on image so far but I’m unsure of how to make them into an array.

This is the code I’m using now to download one image by name and assigning it into a texture variable

        storage = FirebaseStorage.DefaultInstance;
        storageRef = storage.GetReferenceFromUrl(_url);

        storageRef.Child(_resourceName).GetBytesAsync(1024* 1024).ContinueWithOnMainThread(task =>
            if (task.IsCompleted)
                Texture2D texture = new Texture2D(1, 1);
                byte() fileContent = task.Result;

                selectedText = texture;
            if (task.IsFaulted)
                Debug.Log("faulted DOWNLOAD");


now through that i want to replace my current function which loads all images through the inspector.

 if (LevelSystemManager.Instance.CurrentLevel < source.Length)
            selectedText = source(LevelSystemManager.Instance.CurrentLevel);

Source being the array i use from the inspector to load those images into the game scene which then are selected into the selectedTex Texture2D and loaded based on the level, so 0 element in array == level0 , 1 == level 1 etc. etc.

So i was wondering if i have a couple of folders inside firebase with 10 to 20 images each how can i make that source array pull from that folder? And as a result remove the need to have them in the game and of course not setting them through the inspector.