hello I want to make a magnifying glass on a picture so that the part of picture is extended ? in other words i want to find a easy method to create the illusion of a magnifying glass,I know ShapeDrawable and BitmapShader(Bitmap, Shader.TileMode.REPEAT,
Shader.TileMode.REPEAT) is useful,but I donot k...
I am searching a 2D matrix (or bitmap) class which is flexible but also fast element access. The contents A flexible class should allow you to choose dimensions during runtime, and would look something like this (simplified):
class Matrix
{
public:
Matrix(int w, int h) :
data(new int[x*y]), width(w) {}
void SetElement(int...
I have two questions:
1) I have a PictureBox and its Dock is set to Fill. When I resize the Form I cannot create a Graphic on the part of the PictureBox that is extended. What is the problem?
2) I want to convert the Graphic that is created on the PictureBox to Bitmap and save it as
*.JPG or *.bmp. How can I do this?
...
I try to read an image from sdcard (in emulator) and then create a Bitmap image with the
BitmapFactory.decodeByteArray
method. I set the options:
options.inPrefferedConfig = Bitmap.Config.ARGB_8888
options.inDither = false
Then I extract the pixels into a ByteBuffer.
ByteBuffer buffer = ByteBuffer.allocateDirect(width*heigh...
I have an Android game that has an activity for the menu, and then another activity for the game that creates a SurfaceView and Thread to deal with canvas drawing and game logic. When you exit the game and start it up again too much or if you open and close the keyboard (thus restarting the activity), the game runs out of memory, usually...
I want to load a image (.bmp) file on a Win32 application, but I do not want to use the standard LoadBitmap/LoadImage from Windows API: I want it to load from a buffer that is already in memory. I can easily load a bitmap directly from file and print it on the screen, but this issue is making me stuck :(
What I'm looking for is a functi...
The only way I found so far is System.Drawing.Bitmap.GetPixel(), but Microsoft has warnings for System.Drawing that are making me wonder if this is the "old way" to do it. Are there any alternatives?
Here's what Microsoft says about the System.Drawing namespace. I also noticed that the System.Drawing assembly was not automatically add...
I have a win32 program that creates a bitmap screenshot. I am trying to figure out the x and y coordinates of the bmBits. Below is the code I have so far:
UINT32 nScreenX = GetSystemMetrics(SM_CXSCREEN);
UINT32 nScreenY = GetSystemMetrics(SM_CYSCREEN);
HDC hdc = GetDC(NULL);
HDC hdcScreen = CreateCompatibleDC(hdc);
HBITMAP hb...
i've used a Loader and URLRequest to download a .png from the internet and add it to my display list. since it's already a bitmap, does it have built in bitmap data already? or do i have to create the bitmap data myself?
also, why does the same trace statement return false in the mouseMoveHandler when it outputs true in the displayIma...
How do I get a .NET Bitmap and an OpenCV image to point to the same chunk of memory? I know that I can copy from one to the other, but I would prefer that they just point to the same pixels.
Bonus points for a solution using Emgu.
...
I have actually solved this problem but it was a weird one so I will post it and my solution.
I had a movie clip with several children each of which had it's own alpha settings. It also had a bitmap child object with a masked movie clip sitting on top of it.
I was fading in and out the parent movie clip and was getting some odd results...
Hi! i am downloading images from Url and displaying them. At download time it is giving out of memory error : bitmap size exceeds VM budget. I am using drawable. Code is below:
HttpClient httpclient= new DefaultHttpClient();
HttpResponse response=(HttpResponse)httpclient.execute(httpRequest);
HttpEntity entity= response.getEntity();
Buf...
Hi everyone,
I'm trying to implement the following: I have an Items Manager, that has an Item class inside. Item class can store two possible visual representations of it - BitmapImage(bitmap) and UserControl(vector).
Then later, in the game, I need to share the same image or vector control between all possible places it takes place. F...
I have a Imageview in main.xml, how to set the bitmap the to the imageView in main.xml
i can assign bitmap to the local image view in the below code.
//Activates the Camera
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
startActivityForResult(intent, 1);
// get the bitmap data from the Camera
Bundle...
I've been struggling to wrap my head around this for some reason. I have 15 bits that represent a number. The bits must match a pattern. The pattern is defined in the way the bits start out: they are in the most flush-right representation of that pattern. So say the pattern is 1 4 1. The bits will be:
000000010111101
So the genera...
Hi, i simply want to load a .BMP file and get the Bitmap object in 24bit RGB format (or 32bit in RGB format).
All methods I tried return a Bitmap/Image object with PixelFormat = Format32bppArgb. Even if of course BMPs don't have alpha.
new Bitmap(System.Drawing.Image.FromFile(fileName, true));
new Bitmap(fileName);
I currently solve...
I have some images that I loaded from a remote source stored in Bitmap variables and I want to display them. In addition to switching between these images the user should also be able to zoom and pan them. My first idea was to somehow pass them via an intent to the built-in gallery application but this doesn't seem to be possible.
A solu...
I am using BitmapFactory.decodeFile to load Bitmaps of images into my application. However, the function returns null on large images (such as those from the camera). The filepath is definitely correct, I just can't figure out why it would return null. I tried supersampling, but it didn't seem to help.
Does anyone have any idea why it w...
First of all let me say that this questions is slightly connected to another question by me. Actually it was created because of that.
I have the following code to write a bitmap downloaded from the net to a file in the sd card:
// Get image from url
URL u = new URL(url);
HttpGet httpRequest = new HttpGet(u.toURI());
HttpClient httpclie...
I am communicating with an instrument (remote controlling it) and
one of the things I need to do is to draw the instrument screen.
In order to get the screen I issue a command and the instrument
replies with an array of bytes that represents the screen.
Below is what the instrument manual has to say about converting the response to t...