Questions tagged [pixmap]

123 questions
0
votes
0 answers

Why replacing widgets in PyQt6 layout only deletes item when in thread, while working properly outside thread?

I am creating an app using Python 3.10 and PyQT6. It is going to be a photo editor. The idea is that user presses the button #1 to choose an image file, then the image is shown in window (in a pixmap), and when a user presses the button #2, program…
teyo
  • 1
  • 1
0
votes
0 answers

mupdf: how to put a fz_pixmap into Qt4 QPixmap

I am trying to exploit mupdf library (Qt4 app). I have taken some code from pdfdraw.c. I was able to create a pixmap (fz_pixmap) from a pdf page. Now I need to display the pixmap. It is likely I can use QPixmap but I ask how to do so.
P5music
  • 3,197
  • 2
  • 32
  • 81
0
votes
1 answer

How to draw a line in LibGDX without ShapeRenderer

I am using LibGDX and have an ArrayList of multiple points which I want to connect. I am aware there are several methods with ShapeRenderer that work, however im running a SpriteBatch at the same time so what do I do now to draw a line with two…
eisa.exe
  • 78
  • 9
0
votes
0 answers

Python 3.10 pyqt5 Label won't change 'setPixmap' when needed

I'm currently running python 3.10 and within a match/case and having a weird outcome. Let me explain: Image of my code class Test(QtWidgets.QMainWindow): def __init__(self): super(Test, self).__init__() # comboBox changes = image gets…
OMGKewl
  • 41
  • 3
0
votes
0 answers

How do I display a PDF page in pygame without having to save a file in a folder in between?

I have created an app that runs with PyGame, which loads a page of a PDF, creates a Pixmap with getPixmap and saves into a jpg file. Then, the image is displayed with pygame.image.load(). The program works perfectly fine, but it requires to save a…
0
votes
0 answers

What is the correct way to use a .xbm image in source code?

I noticed that X bitmap (.xbm) image files double as valid C code, I assume so you can easily embed them in programs. It #defines constants for the width and height of the image, and includes the image data as a char array. That is, if you open the…
flarn2006
  • 1,787
  • 15
  • 37
0
votes
0 answers

PyQt label with pixmap not resizing correctly

In PyQt I'm trying to create a label which contains a pixmap and have the pixmap automatically resize as the label resizes — say, as a result of the window the label is in resizing. I am experiencing several problems: The window refuses to resize…
Steve Wehba
  • 161
  • 1
  • 6
0
votes
1 answer

How to move a pixel column in PyQt5 Pixmap?

I am making a python project,I am using pyqt. The aim is to show a picture (I am using Pixmap) and I want that any column of pixel of this picture go down randomly according to the time. The aim is to create an effect of 'dissolve' the screen. Here…
Solar
  • 3
  • 3
0
votes
1 answer

Tkinter:Cant place image which imported from Pixmap inside text widget using button

So i am using python 3 and got confused why the image doesnt show up in text widget after excuted the following code: from tkinter import * import…
0
votes
1 answer

Rotate background PYQT5

I'm trying to rotate a background image with a button and trim the image over the window, but it doesn't work and I don't know why it is not working. But when I hit the button my image just fades away... And here is my code: import sys from PyQt5…
felipeM
  • 3
  • 3
0
votes
1 answer

Color issue when saving PDF page Pixmap as PNG using PyMuPDF

I'm running the following bit of Python code from the PyMuPDF 1.16.17 documentation, which save PNG images for every page in a PDF file. import sys, fitz # import the binding fname = "test.pdf" # get filename from command line doc =…
0
votes
0 answers

Draw on GdkPixbuf without cairo in python gtk 3?

How do I draw on a GdkPixbuf object without using cairo? There are quite a few samples in gtk 2 that do this by obtaining a Pixmap and draw on it. However, I can seem to find any function that return a Pixmap in gtk 3. For example…
Chu Bun
  • 513
  • 1
  • 5
  • 17
0
votes
0 answers

Pixmap PNG cannot be read

In Qt Designer 4.7, I am trying to add custom icons to a UI. When editing the QPushButton or QLabel properties, I'll go to Icon -> Choose File and select my PNG. I then get this popup error: "The pixmap file 'custom/icon.png' cannot be read." I have…
Valkyrian
  • 1
  • 1
0
votes
2 answers

Array buffer and winapi

Context : Windows 10 WinAPI and C code Question : I have a buffer of pixel represented as uint8_t buffer[width * height * PIXEL_SIZE] that i would like to regularly modify the content data and redraw the buffer into the window. I'm encoutering two…
user7364588
  • 1,014
  • 2
  • 12
  • 32
0
votes
0 answers

How can I resize my pixmap in GTK2

I'm maintaining a gtk2-based application which contains a drawing area with a blank pixmap. On some user interactions, some items (boxes, etc.) are drawn on the pixmap. We have reached a point where the pixmap (which is initialized with a fixed…
nschoe
  • 1,967
  • 1
  • 19
  • 26
1 2 3
8 9