Inputstream/Movie image quality toggle live wallpaper - java

Hi there I'm making a live wallpaper and I want to have an option so that people can disable it being hd (so that low power devices will also be able to use my app). My live wallpaper uses an inputstream and a Movie. Is there anyway I can downscale the quality using code?
The reason I am using movie is because I am using an animated gif for my wallpaper.
(Or do you have to edit the quality of the Canvas that the live wallpaper draws onto the movie each frame?)

Related

Android physical camera on emulator blocks part of app bar on Pixel 6

I was testing out my app on various emulators and I noticed that on some devices like the Pixel 6, that the physical camera blocks a portion off the screen in portrait mode.
I already set the display cutout area to LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER
Link about display cutouts:
https://developer.android.com/develop/ui/views/layout/display-cutout#:~:text=A%20%5Bdisplay%20cutout%5D%5D(,API%20level%2028)%20and%20higher.
Is there any workaround to deal with this? (Like present the app bar and the rest of the app below the camera).
The picture of the page below is an example of the problem I'm dealing with.

Image resolution vs screen resolution vs camera resolution

I am making an android based app that includes image capturing and displaying it on the screen.
I’m currently using Android Studio to develop this application.
I am developing this app with a Xiaomi RedMi note5A/5. The screen resolution is 1280x720. However, its camera can take a much higher resolution image. Will the phone’s screen resolution be able to display that captured imaged at its best resolution or will it be scaled down to fit 1280x720 due to screen limitations.
I’ve tried looking up the method for getSupportedPreviewSizes() method in the library and attempted to use it. The supported preview sizes are only up to 1280x720. Please advise! Thanks
If the picture has more pixels than the screen, then the image must be scaled or cropped in order to be displayed. An easy way to deal with this is to simply set your picture as the source of an ImageView. Android will handle the scaling, so your image can fit the view. See below for a simple example.
myImageView.setImageBitmap(pictureBmp);

Set android camera to send gray scale images

Can the android camera be programmatically set to send gray scale images.
I'm not asking about conversion after the images have been received, I'm asking for a way to programmatically set it like we do with fps, resolution etc.
Are you talking about the built in camera app (via an intent) or inside your app?
If it's the built in camera app, i don't think it's possible, and even if it was , you can't assume it will work the same on all devices, since many of them have customized camera apps.
About camera within your app, yes, you can do it, and there are examples out there how to do show things on the camera based on its content , like this one

Best approach (if any possible) in windows for getting live screen image

I want to capture the frame currently in display on the screen of a windows pc regardless of what is being displayed as a bitmap or image file or similar.
Until now I used the Java robot API and some C++ api, however it can capture only the desktop and windows etc. but cannot capture anything that's being drawn using an overlay like videos or directX games.
Capturing while a video playing returns a image with video region black and when in game it returns image of desktop as game isn't running!
Is there any standard method for capturing everything on the screen (like in fraps etc.)?
or I need to make a custom driver for each graphics card (Impossible)
The following is the code for capturing screenshots from Java:
http://www.codinguide.com/2010/04/capture-screen-shot-from-java.html
Hope that helps.

Cropping a wallpaper in order to have a crisp image

I am currently working on a wallpaper application. Is there a way to make a bitmap look less blurry and more crisp once it is set as a wallpaper?
Does it just require cropping the picture and resizing it to fit the size of the screen perfectly, or there is some other way?
P.S. I read that the application wallpaper set and save is able to deliver very good quality wallpapers once launched!
Where are you saving the bitmap? Try placing it in /res/raw as opposed to /res/drawable This prevents android from optimizing the image file, and should make it crisper.

Categories