resolution

Media query about screen size instead of resolution

那年仲夏 提交于 2021-02-06 10:14:21
问题 Is there a workaround to use physical screen width in CSS media queries? Today, there are phones which exceed the resolution of desktop monitors. However, phones should still display the mobile layout and desktops the standard layout. So I can't rely on pixel based queries like the example below. Instead, I need either a physical measurement, or one about the pixel density. @media screen and (min-width: 700px) { } Since I haven't found such measurements through my research, they might not

Loading different video (html5) quality according to screen resolution

[亡魂溺海] 提交于 2021-01-28 18:56:27
问题 Im trying to display different video resolution according to the users screen height resolution, i have this code but im not an expert with javascript. It's supposed to change the src attribute, if the res is lower o equal to 360px height, and so on. Any suggestions? <script type="text/rocketscript"> var v = new Array(); v[0] = ["https://dl.dropboxusercontent.com/u/51626189/nli-vids/intro/intro-360_x264.mp4"]; v[1] = ["https://dl.dropboxusercontent.com/u/51626189/nli-vids/intro/intro-480_x264

Issue setting Kivy to fullscreen

99封情书 提交于 2020-08-24 06:31:51
问题 I'm trying to write an application that runs kivy at full screen. But these are my issues: 1) When I run the command: #Config.set('graphics', 'fullscreen', 1) Then kivy appears to go full time, but the window has a lot of black spaces around the background image. Even if I elongate the image, kivy just cuts the image when showing it. 2) When I run this command to set the window size to the size of my screen: Config.set('graphics', 'width', '1366') Config.set('graphics', 'height', '768') This

Issue setting Kivy to fullscreen

允我心安 提交于 2020-08-24 06:31:20
问题 I'm trying to write an application that runs kivy at full screen. But these are my issues: 1) When I run the command: #Config.set('graphics', 'fullscreen', 1) Then kivy appears to go full time, but the window has a lot of black spaces around the background image. Even if I elongate the image, kivy just cuts the image when showing it. 2) When I run this command to set the window size to the size of my screen: Config.set('graphics', 'width', '1366') Config.set('graphics', 'height', '768') This

Programmatically change image resolution

╄→гoц情女王★ 提交于 2020-07-16 16:38:32
问题 I have calculated that if I want my generated image to be A4 size @ 600dpi for print purpose, it needs to be 7016x4961px @ 72dpi. So, I generate it programmatically, then test it in Photoshop and it seems to be fine so if I resize it, it gets proper size and resolution . What I wonder about is if it's possible to make this resizing programmatically, preferably with PIL, but not necessarily with it. I need to make it higher DPI. 回答1: If you have generated your image 7016 x 4961 px, it is

Does adding images in pyplot lowers their resolution?

坚强是说给别人听的谎言 提交于 2020-06-29 03:58:48
问题 The following code from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * import sys from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.figure import Figure from matplotlib.offsetbox import OffsetImage, AnnotationBbox import matplotlib.pyplot as plt import numpy as np class View(QGraphicsView): def __init__(self): super(View, self).__init__() self.initScene(5) def initScene(self,h): self.scene = QGraphicsScene() self

tkinter not recognizing screen resolution correctly

北城余情 提交于 2020-05-15 04:32:28
问题 I'm using a 4k display (3840x2160). from tkinter import * root = Tk() width = root.winfo_screenwidth() height = root.winfo_screenheight() print (width, height) mainloop() When I run this code the output is 1536 by 864 Could someone explain why this is happening, and how I can fix it, Thanks. 回答1: Looking at the problem, it seems to be a defect in ms-windows, and tk not using the known workaround for it. Looking at the source code for tk , in the file win/tkWinX.c the function

Python OpenCV access webcam maximum resolution

大兔子大兔子 提交于 2020-04-29 10:49:33
问题 I am trying to acquire images from my webcam using a python code that imports OpenCV. The code is the following: import sys sys.path.append("C:\\opencv\\build\\python\\2.7") import cv2 import cv2.cv as cv import time # Set resolution cap = cv2.VideoCapture(0) print "Frame default resolution: (" + str(cap.get(cv.CV_CAP_PROP_FRAME_WIDTH)) + "; " + str(cap.get(cv.CV_CAP_PROP_FRAME_HEIGHT)) + ")" cap.set(cv.CV_CAP_PROP_FRAME_WIDTH, 800) cap.set(cv.CV_CAP_PROP_FRAME_HEIGHT, 600) print "Frame

MonoDroid apps don't use correct density drawables

故事扮演 提交于 2020-02-16 05:14:28
问题 I am getting some very interesting results when testing an app developed with MonoDroid on different devices with varying screen sizes and densities. I have the following (simplified) folder structure set up in my project: drawable image.png drawable-ldpi image.png drawable-mdpi image.png drawable-hdpi image.png drawable-xhdpi image.png The image in drawable is that of a folder. The images in the other folders are identical except for the size and a letter that is drawn on top to indicate