I build a funcional openCL program that works totally fine with square images but with a 800x600 or 150x200 I always get noise.
heres is a link for the image: http://s21.postimg.org/od6orka1z/aaaaa.png
Anyone can help me to remove this error in non square images?
Thank you
Related
I am working on a existing Qt application and trying to support it on 4K monitor. For scaling the app, I am using "QT_SCREEN_SCALE_FACTOR" and scaling fonts based on logical DPI of screen. Everything is fine till this. Fonts for ribbon, docked windows are ok after scaling. But the font is getting too bigger for floating forms (pop up dialogs) and the docked widgets after undocking (the moment window is undocked, font is becoming bigger). I don't understand why this is happening. Is windows taking control over floating forms and making font bigger? Or am I missing something?
I am not using "Qt::AA_EnableHighDpiScaling" or "QT_SCALE_FACTOR" because I did not find these useful for me.
Has anyone faced this kind of problem?
Please let me know if someone knows about this.
After trying this and that, I found a solution to this problem.
I added'QGuiApplication::setAttribute(Qt::AA_DisableHighDpiScaling);' before creating QApp. And then I just needed to change the font size.
I first apologize if this question is in the wrong place or is formatted wrong. I am young and this is my first post ever here. I was planning on creating a camera app when I get my macbook but before that I was looking at other cameras and noticed that there is an app that shoots 4000x3000 24fps H.265 video on my iPhone 7 plus. How is this possible? Does the API easily let you choose resolutions above 4K or do you have to use a trick?
No, it's not really possible. An app that's allegedly doing it is interpolating pixels between the actual pixels that the camera is delivering. That means it's basically making up extra pixels, typically by averaging the colors of nearby pixels.
I have a program I designed for Desktop Applications for Windows with Qt MinGW 5.7. I was curious to see if it would work on a Surface tablet with Win10.
It does work, except for a small detail: eveything is offset. For instance, I grab the screen width with
"GetSystemMetrics(SM_CXSCREEN)" and I use this to place my window in the center of the screen. This works well on WinXp to Win10. However on a Surface tablet with Win10, everything is offset.
If I place an object at (0,0) it's fine but if I place it at (10,0), it will appear at (20,0).
What can I do ?
Thank you so much,
Alex
For the offset problem, I think it has to do with High-DPI scaling: http://doc.qt.io/qt-5/highdpi.html
But i'm not sure what to do to do it right.
Thanks,
Alex
I have a large png image (950x500px) which I have been scaling down using CSS to 500px wide (and 263 high). Before putting this webpage online I decided to scale the image using GIMP as scaling images with CSS is bad practice. However there is a noticeable reduction in image quality when I scale the image using GIMP rather than CSS in Google Chrome even though both images are png and have identical dimensions. I have tried using all four compression methods offered by GIMP (None, Linear, Cubic and Sinc (Lanczos3)) and none of them match the image quality given by Google Chrome.
What compression method does Google Chrome use to give such high-quality image scaling and how can I achieve this offline?
You may get the answer to your question here: How web browsers resize images
Chrome seems to be using several algorithms depending on the scaling factor:
With a very slight downscale (557 to 555 pixels), Chrome uses the same
linear interpolation as when upscaling. (The fact that this graph is
disconnected is an artifact of the way ResampleScope works, and has
nothing to do with Chrome.)
But look what happens if we downscale just a bit more, to 543 pixels:
[…] We get a completely different result: clearly a 3-lobed Lanczos
filter. Chrome’s strategy may be to use Lanczos when reducing an image
by more than 2.5%.
If you have to do it yourself (to get more control on the result), Cubic is usually the best bet scaling up and Sinc (Lanczos3) for scaling down.
If you scale the image yourself, you know how it will look on all browsers.
Note: There are more and more computers equipped with high resolution displays (around 4 times the pixel density of a classic display). You may want to check how images look on those computers. There is a high chance they are scaled up by the browser.
This is a very old question, but I was struggling with an image resize in Gimp yesterday. When I compared the image resized in Gimp with the image automatically resized in Chrome (and Safari), there was a visible difference.
I was resizing a PNG logo from 89x127 to 69x101 and the text blurred after the resize in Gimp no matter which interpolation I chose.
Thanks to the comment above saying that ImageMagick gave a better result when resizing an image, I found this article: Efficient Image Resizing With ImageMagick
The command from the article, despite its claims to be indistinguishable from Photoshop, did not produce a result that matched Chrome, however one of the commenters added a command that did create an image that produced the closest result (barring the resize my friend did in Photoshop):
convert SOURCE_IMAGE -resize OUTPUT_WIDTH -quality 90 -unsharp 0x0.55+0.55+0.008 OUTPUT_IMAGE
I think the trick lies mainly in the sharpening. I've tried different settings and can't exactly match Chrome, but this came pretty darn close.
For completeness, here is the command from the article. Please read the article for a full explanation of how it works:
mogrify -path OUTPUT_PATH -filter Triangle -define filter:support=2 -thumbnail OUTPUT_WIDTH -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB -strip INPUT_PATH
My game have a tiled 2d map. This is a scene screenshot:
I found when I move the camera vertically, there are strange white lines randomly appeared between randomly tiles, See:
I don't know why....
PS: This is a pixel style 2d game, so my texture's filter mode is "Point".
PS: I uploaded this test scene at https://dl.dropbox.com/u/53858613/Web/Web.html , Hold the left mouse button , camera will move downwards, then you'll see white lines randomly.
Change your materials shader to something more suited for 2D. Such as sprite/default.
I made a quick test project and changing the shader from "diffuse" to "sprite/default" solved the issue.
What fixed it for me is setting the compression for my 2D spritesheet to point instead of bi-linear
I do not see this issue on my machine with your example project.
It seems just fine.
1) Make sure there is no white line in the actual image.
2) Make sure resolution options are not an issue.
3) I am not 100% sure but in the skybox the same happens with BLACK lines. Try and change the texture's texture mode to Clamp if possible. This might resolve the issue.
Hope this helps,
-Smileynator
According to this Tilemap tutorial by Brackeys, try turning off antialiasing under Edit>Project Settings>Quality>Anti Aliasing.