BackGrond gets distored while building application in code name one - codenameone

I am building a application in codename one which has a log-in age.
I have a created a UI as the requirements but when i build the application from codename one's server for android then i see that a streamed background image gets distorted and convert in to lines.
The background image has a gradient from 3 dimension to center top.
I checked it in codename one simulator its looks fantastic but in android emulator background image gets distorted.
Please check attached image for it. i have added two image 1st is of codename one's emulator and 2nd one is android emulator.
Please let me know that i do.

You have a background gradient, the devices have a limited number of colors so the background will be distorted to some degree as the colors are adapted to the lower color count on the device.
This is assuming you didn't use a mutable image or a round rect border (not image border), in those two cases the number of colors might be lower because of drawing to an image surface that might be 16bit.

Related

Wrong photos orientation in Codename One

I need a clarification. Today I bought a new Android 10 Samsung device to test apps... and all captured images are shown rotated wrongly inside the Labels. The code is very minimal: takes a photo and then shows it in a Label. It works fine on my iPhone and my old Android device, but in this new Android device the image orientation is not detected correctly by Codename One.
Is it a bug of Codename One or is it something that needs coding in the app?
In the latter case, can you give us a code to take photos in the correct orientation? Thank you.
I think there might already be an issue on that, if not there should be. The gist of it is this... Some modern phones always take the photos in the same orientation and just mark the photo as rotated to X degrees in its tags.
This works usually since most apps know to show the photo rotated. Currently we have a workaround for that in the gallery API but that's a bad workaround. A good workaround would be to check that flag every time we load an image and rotate it dynamically. It would be inefficient but it would solve that problem once and for all.

Background Image Issue with IOS

I am using the "FlatBlueTheme" and I modified the Form to have a background image.
On Android: background image shows elegantly
On Simulator: background image shows elegantly
On IPad Mini (32bit) : background images shows on first form -- when switching to a new Form().show() the background of the form goes solid black.
This will happen if the image is either really big and thus exceeds the GPU threshold on iOS (typically 4096 pixels but this can vary).
This can also happen if the format of the image isn't supported on iOS e.g. jpeg2000 possibly gif or some other format. Make sure you use either PNG or regular JPEG.
You see the image initially because of the screenshot process described in the iOS section of the developer guide.

Microsoft Surface & WPF

I have WPF application work with 1024x768 screen resolution, now I want to run this application on Microsoft Surface with wide resolution, I had make new windows with resolution 1366x768, but unfortunately I can't make it work fine on Surface, I tested it on my laptop, it's work 100%, but I don't understand why it would't work in the same way on Surface.
If there is anyone that has experience with Surface can you please help?
Update
When I run the WPF windows with resolution 1920x1080 work full screen on my laptop, but the problem is when run application on Surface with the same resolution don't fit the full screen, see this screenshot to more clarity:
Maybe your surface and laptop have different DPI settings. See here how to handle that problem.
From the information provided it may be that your WPF window layout doesn't sufficiently take into account differences in Display text and item sizing on different devices.
On both your Surface Pro and your laptop:
Select "Screen Resolution" from the Desktop context menu.
Select "Make text and other items larger or smaller" from the Screen
Resolution window.
Check the position of the "Change the size of all items" slider.
By default the Surface Pro is set to Larger. A new Windows 8 install will be set to Smaller.
In WPF you should not be setting a constant window size, instead you should:
Make the window's content react to the window size by using auto sizes and grids instead of constant sizes and panels
You can use WindowState="Maximized" to make the window full screen
You can prevent your window from being reduced too much with minwidth and minheight.

Web App V Win App - Display differences

I have been searching for any info on this without success.
I am updating an application that has two versions. A WPF windows app and an MVC web app. The requirement is that they must look the same.
Why when I add an image of, say, 100px X 100px to both the image in the web app looks larger than the image in the win app?
If I add margins the space between the items looks more in the win app than it does in the web app.
I thought I was mistaken so I physically measured both and confirmed the differences.
I want the 100X100 image in both apps to look the same and do not want to up size as this will distort the image.
Can anyone explain why this would happen and any way I can get around it?
Many Thanks
Fred
Assuming no styling is being applied to the images either in XAML or CSS, they could still be different because WPF pixels are device independent.
I guess you could set the ScaleTransform of your WPF app to match the desired size, but remember this will be different depending on monitor size and Windows DPI settings.

Why does my virtual cam (using e2eVcam directshow filter) doesn't display in Skype or Lync correctly?

I'm using e2eSoft's VcamSDK to create a virtual cam and put image overlay over it programmatically on a WPF application.
Everything seems to work as I want when viewing the graph using GraphEdit.exe. But Lync doesn't display any video or image i push, and Skype only displays the half of the webcam stream i see from GraphEdit. Lync can display the stream perfect on video device settings tab, but can't display it on a video conversation, just blank screen.
I'm just pushing some image as overlay on codebehind, and can't seem to work on these both. The Resolution of virtual webcam is 1280x1024 and the Image I'm pushing as overlay is also the same.
Here is my graph on GraphEdit;
I'm not very experienced with these subjects so I don't even know where to start, any help is extremely appreciated. Thanks!
Skype does not like high resolution and, is generally, not so much DirectShow friendly. IIRC it will grab 640x480 from the center of the image and will ignore the rest. There is nothing wrong with the camera filter, it's Skype's choice to propagate the motto "640x480 is enough for everyone".

Resources