I have a widget with an ImageView on it. I set this ImageView to a Bitmap created from a 9-patch PNG resource. The image is set correctly but is not stretched correctly - i.e. the whole image is stretched instead of just part like defined in my 9-patch PNG. If I just set the 9-patch image as a resource, it works. How can I fix this?
// ...
So I have an image that I load using the CreateDecoderFromFilename method of the IWICImagingFactory I just created. It's easy enough to cast this to a Bitmap, but I want to extract the R-G-B-A channels independently so I can compare them to the values from a previous image, and calculate the error.
From the MSDN website...
IWICBitm...
Hi everyone,
i have two bitmap images ..and i need to merge the bitmaps with precise positioning of one bitmap over other and get a resultant bitmap (which is combination of both)
and the resultant bitmap is a font character and i want that bitmap to be displayed in a edit box where i am inputting text.
is it possible. Please help.
...
Hi there,
I have got two images, say png and jpeg and I need to overlay them.
In WPF it can be done by DrawingGroup (unavailable in SL). I guess it might be done
with WriteableBitmap instead. Do you have any idea how to do that?
Thanks in advance!
Cheers
...
I'm trying to cross compile some libraries for WPF and Silverlight.
Currently one of the libraries depends on System.Drawing.Bitmap which is not available in Silverlight.
It's a class that represents a device specific image format,
and holds a reference to a Bitmap instance in order to display this image
in a WPF application.
What coul...
Hello, I am new to this site, and I come with a question about Android.
Is there any way to convert a Bitmap to grayscale? I know how to draw a grayscale bitmap (using canvas operations: http://www.mail-archive.com/[email protected]/msg38890.html) but I really need The actual bitmap in gray colors (or at least somethin...
My application requires me to store sets of bits along with some accompanying metadata on the Android platform (read only for now). Now obviously I could just implement the Serializable interface, but I hear it's very slow on Android (I can imagine has to do something with the custom VM and compiler that makes such reflective features in...
I am writing an app to capture the camera preview frames and convert it to bitmap in Android. Here is my code:
Camera.PreviewCallback previewCallback = new Camera.PreviewCallback()
{
public void onPreviewFrame(byte[] data, Camera camera)
{
try
{
...
I am working with Bitmap C# and wondering how to convert a color png image to only one color. I want all the visible colors in the image to become white. The parts that are transparent should remain transparent. I am going to display these agains a grey background.
...
Can we compare two Image objects with C#? For example, check whether they are equal, or even better check how similar are their pixels?
if possible, how?
...
Im currently developing a program that uses a scrollable/zoomable image as the main user interface. It uses a canvas which is manipulated by a matrix to traverse a large area. Instead of loading a super large bitmap into memory, i wanted to employ a tile system to load 256 by 256 squares. My problem is that the app will lag when the ima...
Saving the file:
FileOutputStream fo = null;
try {
fo = this.openFileOutput("test.png", Context.MODE_WORLD_READABLE);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
bitmap.compress(CompressFormat.PNG, 100, fo)
Loading the file:
String fname = this.getFilesDir().get...
Hi there,
I have noticed a bizzare situation - in SIlverlight, when a picture is rendered using WriteableBitmap Render method, the resulting pic is very sharp. Of course in WPF Render method is not available. I have used DrawingGroup to render two images on top of each other (I have got a png with transparency and standard JPEG). Howeve...
I have been trying to optimize my single thread app which loads a bunch of tiles that makeup a large bitmap. The app was becoming very sluggish when it would load the new tiles into system memory. Im now looking trying to use Async Tasks for this purpose. The app detects which tile is in the top left in a method called by onDraw, creates...
I'm making a game with 5 objects moving around on the screen with SurfaceView. It's not a problem until a display all 5 objects to the screen. It displays a black screen. Any suggestion?
I'm using SurfaceView and use onDraw() to draw bitmaps.
...
Ok, it appears that the I'm creating a PDFDocument where pixelWidth is incorrect in the images that I created. So the question becomes: How do I get the correct resolution into the image?
I start with bitmap data from a scanner. I'm doing this:
CGDataProviderRef provider= CGDataProviderCreateWithData(NULL (UInt8*)data, bytesPerRow * le...
I'm doing a simple image resize and on the final I want to save it like:
path = "C:\\new_image.jpg";
img.Save(path, jpegCodec, encoderParams);
The problem is it saves to "....... \Users\Ervin\AppData\Local\VirtualStore\" .
What did I do wrong or what did I miss out?
UPDATE: I changed the path to an other folder, and it works. it seem...
I'm pretty sure I saw a specific command for this, but I can't remember what it's called, which means I can't Google it!
If I have an image resource, e.g. R.drawable.myimage , which gets used in a Linearview more than once and I want to change the alpha on just a single occurrence of that image, (normally, changing the alpha changes all...
Is there any easy way to stamp bitmaps along a line in Android? I've found the PathDashPathEffect class but that only allows Paths to be stamped, rather than bitmaps. It seems like it should be possible, but I'm not sure where to start.
I could obviously just draw bitmaps along the line, but it seems to me like that would be a bit more ...
Good morning all,
I am currently implementing a method that accepts two bitmap objects. We can assume that said objects are of equal dimensions etc. The return of the method is a list of Pixel changes (this is stored in a self-made object). This is being developed in an iterative manner so the current implementation was a basic one... s...