SplashScreenImage as Background: little jump at the start? - windows-phone-7

I've the same image as SplashScreenImage and as background, the effect is nice but at the start, after the loading, my image slides a bit on the top..
It's pretty visible (and disturbing) as effect, because the image is the same..
I'm using the ApplicationBar (all visible), don't know if it's a problem.
I've setted the background image as "Uniform to fill" (tried all btw) in my LayoutRoot, I've a Pivot control.

The problem is really the ApplicationBar, if you set it opacity to something like "0.99" you problem should go away.
But the best result may be just by having a second image, with 480x728 (the ApplicationBar is 72px height, so 800 - 72 = 728)

Related

SpriteRenderer Image getting stretched down

I had a spriterenderer for a square but I want to change it from looking like a basic rectangle to having an image instead. So I tried changing the sprite renderer "Sprite" to the image I wanted but whenever I do so the image is looking pixelated, ugly and stretched and I can't rescale it properly.
Before:
After:
The image may look ugly because it is stretched. In your hierarchy, select the GameObject with the SpriteRenderer. Then set the x,y,z scales back to 1.
If it still looks weird, select the image in your assets folder, and play around with the quality & filter settings (Don't forget to click apply). Hopefully this helps with making the image look nicer.
If not, ensure that your image asset is not a low resolution either.
I'm not really sure what you mean about it not rescaling properly. If you could please elaborate then hopefully we can fix it :)

Logo looks different after uploading

Hi, in the first picture you can see what logo I want to upload.
But, after uploading it changes it's color specification a little bit, shown in the second picture (right down corner). It adds the black color.
Could you please help me out?
The code I'm using:
axes(handles.axes13)
imshow('logo4.png')
The problem is in the original png. Here, the top of the logo is set as transparent while the bottom is white. So, when you plot the images using imshow, you have this effect. Either you change the logo png or you can pretend as this problem never existed by setting the background color as white when you load the image.
logo4 = imread('logo4.png,'BackgroundColor',[1 1 1]);
imshow(logo4)
The problem is still there, it´s just someone else´s problem now.
profit.

QGraphicsView / QGraphicsScene image size

I want to display an image in a QGraphicsView with a QGraphicsScene. My code is very basic :
QGraphicsScene* scene = new QGraphicsScene(this);
scene->addPixmap(QPixmap(qApp->applicationDirPath() +"/france.gif"));
ui->myGraphicsView->setScene(scene);
ui->myGraphicsView->fitInView(scene->sceneRect());
My problem is that my picture has a wrong size. It is very small, with wrong proportions and on the center of my GraphicsView. With qDebug i kwow that my picture is load successfully and it has a size of about 100x800px. My graphicsView is smaller so i want to resize my picture to adjust it with my GraphicsView size.
The graphicsView is set in the mainwindow Form and the scene is declared in the header : "QGraphicsScene scene;"
I try everything is possible in the world (i think) but the graphicsView is alaways blank or contains the small version of the picture. When I copy/paste some codes of internet i always get this problem. I also try with this example : Qt GUI Development - Displaying a 2D grid using QGraphicsView , same problem...
Maybe i'm very very very tired but i really don't understand what is wrong. Help me please :)
sceneRect() may not be what you think it is unless you specifically set it. Also you are missing aspectRatioMode in fitInview call which can distort it image, sometimes resulting in "small" appearance.
QGraphicsScene* scene = new QGraphicsScene(this);
QGraphicsPixmapItem p = scene->addPixmap(QPixmap(qApp->applicationDirPath() +"/france.gif"));
ui->myGraphicsView->setScene(scene);
ui->myGraphicsView->fitInView(p, Qt::KeepAspectRatio);
From my experience, a shown image is very small if we try to fitInView before the scene window is displayed. Technically, the sceneRect size is not set in the way we want until it is actually shown. Therefore, we need to let the scene window shows up before we can properly use fitInView.
Well, I think the solution is available here
Qt5 C++ QGraphicsView: Images don't fit view frame

Blurry NSImageView

I have an NSImageView in a view that utilizes Core Animation. Prior to using Core Animation the image looks fine but now its blurry and low quality. If I let NSImageView have a bezel border the issue goes away but I need it to have no border. Had this happened to anyone else?
Imgae in the background with no border, same image in the front with a border.
Thanks
EDIT: I forgot to mention that the image is an icon file (ICNS) so it has various sizes. The bordered view loads the correct size and the transparent one loads the smallest and stretches it.
Although not the way I wanted to, I managed to create a fix for the issue. The issue seemed to be the way that NSImageView was drawing the image so I created a custom NSView subclass with support for the same bindings I used in my original image view. Im not sure why the blurry-ness happend in the beginning, but drawing the image by hand in an NSView seems to do the trick.
Your image may be drawing in a non-pixel-aligned way. Have you tried shifting it by a half pixel?
Apple has a good demonstration of this in the BlurryView app in their "Cocoa Tips and Tricks" sample code.
Cocoa Tips and Tricks

How to fix blurred Icon Decorator on DSL Tools?

I faced this problem and after an extensive research I found its root cause and a workaround that can be useful for other people.
The icon decorator becomes "blurred" because its positioning on the shape and the conversion from pixels to inches.
Usually the drawing surface of the Domain Specific Language has a resolution of 96dpi and the Icon Decorators are positioned using an offset of 0.06 inches. Translating it to pixels it becomes an offset of 5.76 pixels in the drawing surface. As it is not possible to draw a "half pixel" on the screen the GDI+ adjusts the image in an attempt to emulate the "haf pixel" positioning. That is the reason why the image becomes blurred.
My suggestion as workaround, is to use the Horizontal Offset and the Vertical Offset properties of the Icon decorator class for fixing the "half pixel" decorator position. If you use the "0.0025" inches as vertical and horizontal offsets, when the image positioning is translated from inches to pixels it becomes 6 pixels, instead of 5.76. It happens because the offset now is the default value 0.06 inches plus the offset you set 0.0025 = 0.0625.
I also found that using png images with transparency causes the image blurring, even using the offset workaround I suggested here. Converting the image to bitmap format fixes the problem.
If someone also has any suggestions for fixing the problem, please add your solution or workaround.
I fixed the blurred problem by creating a new Bitmap:
Under the overridden method
public override System.Drawing.Image GetDisplayImage(ShapeElement parentShape)
I call my custom method FixBitmap
Bitmap imageFixed = DynamicImageHelper.FixBitmap(image, out dynamicOffset);
This method receives the original image that DSL would show, but instead returns the exact same image but created as a new Bitmap
Bitmap fixedImage = new Bitmap(original, original.Width, original.Height);
return fixedImage;
If you check the new instance properties there are little differences (I don't quite remember which because i implemented this about 1 year ago).
Also, i mostly use .png files with transparency and they look exactly as they are.
Hope this helped.
If you need any further help, do not hesitate,
Regards,
Luís

Resources