bitmap

Does .Net use Device Dependent or Device Independent Bitmaps?

When loading an image into memory, does .Net use DDB, DIB, or something else entirely? If possible, please cite your sources. I'm wondering because we currently have a classic ASP application that is using a 3rd party component to load images that is occasionally creating a “Not enough storage is available to process this command.” erro...

Horizontally Flip a One Bit Bitmap Line

I'm looking for an algorithm to flip a 1 Bit Bitmap line horizontally. Remember these lines are DWORD aligned! I'm currently unencoding an RLE stream to an 8 bit-per-pixel buffer, then re-encoding to a 1 bit line, however, I would like to try and keep it all in the 1 bit space in an effort to increase its speed. Profiling indicates th...

how could create image watermark using ImageMagick

I am trying to convert a 8bpp (256) color gif to a 2bpp (4) color gif through ImageMagick. How can i put an semi-transparent image to the output file in ImageMagick? ...

BufferedImage Help

I posted a question in sun java forums sometime ago and i am finding it hard to understand the first response i received from the replier though it seems he gave me the correct approach to my problem. The link to the question is: http://forums.sun.com/thread.jspa?threadID=5436562&tstart=0 Someone replied that i should use Buffered...

Most efficient way to extract bit flags

I have these possible bit flags. 1, 2, 4, 8, 16, 64, 128, 256, 512, 2048, 4096, 16384, 32768, 65536 So each number is like a true/false statement on the server side. So if the first 3 items, and only the first 3 items are marked "true" on the server side, the web service will return a 7. Or if all 14 items above are true, I would stil...

Load large images into Bitmap?

I'm trying to make a basic application that displays an image from the camera, but I when I try to load the .jpg in from the sdcard with BitmapFactory.decodeFile, it returns null. It doesn't give an out of memory error which I find strange, but the exact same code works fine on smaller images. How does the generic gallery display huge ...

Converting a view to Bitmap without displaying it in Android?

Hi, I will try to explain what exactly I need to do. I have 3 separate screens say A,B,C. There is another screen called say HomeScreen where all the 3 screens bitmap should be displayed in Gallery view and the user can select in which view does he wants to go. I have been able to get the Bitmaps of all the 3 screens and display it i...

Bitfield With 3 States...?

I'm trying to create an authorization scheme for my ASP.NET MVC application where an Enum is used to set permissions. For example: [Flags] enum Permissions { ReadAppointments = 1, WriteAppointments = 2 | ReadAppointments, ReadPatients = 4, WritePatients = 8 | ReadPatients, ReadInvoices = 16, WriteInvoices = 32 | ...

How to get metadata from a picture ?

I am browsing the web but no way to find how to get metadata from a picture. Does anyone has an idea ? I can't see anything in the Bitmap/BitmapFactory/BitmapFactory.Options documentation that would give me a hint. I would like to retrieve standard information such as : name date it was taken dimension size and maybe more. Any ...

What is faster with PictureBox? Many small redraws or complete redraw.

I have a PictureBox (WinMobile 6 WinForm) on which I draw some images. There is a background image that goes in the background and it does not change. However objects that are drawn on the picturebox are moving during the application so I need to refresh the background. Since items that are redrawn fill from 50% to 80% of the surface, t...

Bitmap Crashing upon going back and re-entering Activity

Hello, I'm not sure what is causing this...I have two Activities, first has a button that goes to the second. The second creates a Bitmap object, assigns it a picture from the sdcard and loads it into an ImageView. Problem is when I go into the second Activity, then press the back button, and then go back into the second Activity, it c...

Bitmap in ImageView is cropped off the screen

I'm working on an Android application that needs to download an image and display it inside an image view. The Bitmap is passed to the main java file and added to the image view like this: comic = (ImageView) findViewById(R.id.comic); comic.setImageBitmap(c.getImageBitmap()); This works, except that the left side of the image disappea...

Is there some API on BlackBerry for "smooth" image resizing?

To get image thumbnails on BlackBerry I use EncodedImage.scaleImage32(). It works Ok, but when I open native image viewer (from the Camera app) I see the difference in quality - native viewer thumbnails look nice (smooth, anti-aliased), while mine are a bit ugly. Looks like native viewer resizes images using some filter (bicubic or smth ...

Copying a 14bit grayscale image (saved in long[]) to a pictureBox

My camera gives me 14bit grayscale images, but the API's function returns a long* to the image data. (so i'm assuming 4 bytes for each pixel) My application is written in C++/CLI, and the pictureBox is of .NET type. I am currently using the BitmapData.LockBits() mechanism to gain pointer access to the image data, and using memcpy(bmpDat...

How can I save a bitmap as a .CUR cursor file using VB2008 ?

Hi Stackers In my VB.NET program, I need to save a bitmap as a .CUR cursor file. BitMap.Save provides facilities to save as .BMP, .ICO etc e.g.: (*) MyBitMap.Save(MyFileName, ImageFormat.Bmp) (*) MyBitMap.Save(MyFileName, ImageFormat.Icon) but not as a .CUR cursor file. How can I do this please ? TIA Patrick ...

Is it (width, height) or (height, width)?

Is there a convention for the order of (height, width) in function arguments or when displaying dimensions? ...

win32 - How do I capture a screen as an 8-bit or 16-bit bitmap?

I am just starting out with win32 GDI programming and finding good references hard to come by. I have a simple application that captures the screen by doing the following: UINT32 x,y; x = GetSystemMetrics(SM_CXSCREEN); y = GetSystemMetrics(SM_CYSCREEN); HDC hdc = GetDC(NULL); HDC hdcScreen = CreateCompatibleDC(hdc); HBITMAP hbmp = C...

Display static image in wxWidgets?

Hello there, It's been days for me trying to display a BMP image from memory in a wxWidgets dialog, but none of my tries succeed. First, I tried to create a wxStaticBitmap control in my dialog: // in class declaration inside header file wxStaticBitmap *ibitmap; // in wxDialog constructor // MyLogo is an array of `unsigned char` // ...

Is there a fast alternative to creating a Texture2D from a Bitmap object in XNA?

I've looked around a lot and the only methods I've found for creating a Texture2D from a Bitmap are: using (MemoryStream s = new MemoryStream()) { bmp.Save(s, System.Drawing.Imaging.ImageFormat.Png); s.Seek(0, SeekOrigin.Begin); Texture2D tx = Texture2D.FromFile(device, s); } and Texture2D tx = new Texture2D(device, bmp.Wi...

How can I get the photo saved in Android cell phone in my application

I want display the images saved in the cell phone in my own application. now I am using MediaStore.Images.Media to do this. I can get the name, size and other information of the images. but i don't know how to get the bitmap? can u help me. thx. There is a method getBitmap(ContentResolver cr, Uri url), but i don't know how to get the Ur...