Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

image

How to merge a transparent png image with another image using PIL

August 19, 2022 by Magenaut

I have a transparent png image “foo.png”
and I’ve opened another image with

Categories Python, Q&A Tags image, image-processing, python, python-imaging-library Leave a comment

How to reduce a jpeg size to a ‘desired size’?

August 19, 2022 by Magenaut

In Python 3.x, I am using PIL to resize images, I know that we can reduce the height or width by subtraction or division by pixels. But, is it possible to resize an image to a desired size, say 200kb and remain its proportions? Assuming the image(s) is larger but the size is unknown.

Categories Python, Q&A Tags image, python, python-imaging-library, resize Leave a comment

Python OpenCV Color Tracking

August 19, 2022 by Magenaut

Below is my python code for tracking white color objects. It works – but only for a few seconds and then the whole screen turns black and in some times it not work. I experimented with blue color and it works – but white and green are giving me problems:

Categories Python, Q&A Tags colors, image, image-processing, opencv, python Leave a comment

How do I convert a numpy array to (and display) an image?

August 18, 2022 by Magenaut

I have created an array thusly:

Categories Python, Q&A Tags arrays, data-visualization, image, numpy, python Leave a comment

Get pixel’s RGB using PIL

August 18, 2022 by Magenaut

Is it possible to get the RGB color of a pixel using PIL?
I’m using this code:

Categories Python, Q&A Tags image, pixel, python, python-imaging-library, rgb Leave a comment

Extract a page from a pdf as a jpeg

August 18, 2022 by Magenaut

In python code, how to efficiently save a certain page in a pdf as a jpeg file? (Use case: I’ve a python flask web server where pdf-s will be uploaded and jpeg-s corresponding to each page is stores.)

Categories Python, Q&A Tags image, pdf, python Leave a comment

Tkinter vanishing PhotoImage issue

August 17, 2022 by Magenaut

Note: When a PhotoImage object is garbage-collected by Python (e.g. when you return from a function which stored an image in a local variable), the image is cleared even if it’s being displayed by a Tkinter widget.

Categories Python, Q&A Tags canvas, image, python, python-2.7 Leave a comment

Pygame image transparency confusion

August 17, 2022 by Magenaut

I have read the top 20 posts relating to this issue here, read many examples on Google, tried using .convert(), .convert_alpha(), tried with neither, tried with .png, .gif, tried with the top 5 different images on google. Please someone help me figure out how to make the pieces show with a transparent background. Here is … Read more

Categories Python, Q&A Tags alpha, image, pygame, pygame-surface, python Leave a comment

How to check if a file is a valid image file?

August 17, 2022 by Magenaut

I am currently using PIL.

Categories Python, Q&A Tags identification, image, imghdr, python Leave a comment

Python: The _imagingft C module is not installed

August 17, 2022 by Magenaut

I’ve tried lots of solution that posted on the net, they don’t work.

Categories Python, Q&A Tags image, python, python-imaging-library Leave a comment
Older posts
Newer posts
← Previous Page1 … Page7 Page8 Page9 … Page12 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress