bitmap

Android - Any way to access an Overlay's canvas in another class?

While this may sound backwards, I have a need to draw to my Overlay in another class. I get a bitmap from the MapsView, then essentially draw it on the overlay. I am having difficulty doing this however. Here is what I am doing. First I generate a bitmap from the mapview: Bitmap bitmap = Bitmap.createBitmap(400, 800, Bit...

Bitmap transfer using Winsock, GetDIBits and SetDiBits

Hello. I started working on something similar to a remote control application in c++. I wish to transfer a particular window's screenshot to another PC and display it in a window. Both GetDIBits and SetDIBits functions succeed, the connection is established, the data is sent, yet the image does not appear on the other side, just blacknes...

Android: Widget updating a clock with custom images as numbers

What way is most efficient for updating an widget that will be a clock(Timer/Alarm), but for a clock to really works, like a clock it would be needed to update at least twice in a minute (30 sec period or less). But that can't be effective? Have looked at some of the "threads/topics" here at StackOverFlow but haven't found any informat...

Android bitmap allocation weirdness

I'm having some trouble understanding why this code public class BitmapAllocTest extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); byte[] b = new byte[20 * 1000 * 1000]; b = null;...

Improved bitmap filtering in actionscript/flex

I'm looking for actionscript implementation of bitmap filtering which is better than standard one. With enabled smoothing standard filtering looks good, but in case of non-uniform transformation (non-uniform scale, skew) bitmap smoothing breaks down. Does anybody know how to fix the problem? ...

RuntimeException on widget that has a Bitmap (Android)

Hi, my app has widgets that have an ImageView and a TextView. On the onUpdate() method of the WidgetProvider, I put a Bitmap inside the ImageView this way: Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.widget_btn); Bitmap bitmap2 = BitmapManager.setColor(bitmap, red, green, blue); views.setImageViewBit...

Android - efficient screen update for surfaceview from int array of colors

Hi All, I'm writing an android game which involves updating a SurfaceView very often. This is working fine, but I would prefer if there was a way to only update a sub rectangle of the screen each time, as opposed to the whole screen. I know you can do this with bitmaps, but my animation is operating on a raw colour array (int[]) and I'm ...

Efficient, best way to copy a bitmap context?

I have a bitmap context (iPhone/iOS) I am using for offscreen drawing prior to formal rending to a UIView. I'd like to make a copy of the bitmap context prior to performing drawing operations (and ultimately render) in the event I need to do a revert. I haven't found a Quartz API that allows me to easily copy a bitmap context, but mayb...

Image bit manipulation in Python

Hello SO, I have an application that receives a pointer to JPEG data from a camera API wrapped with ctypes, converts it to a wx.Image, and displays the images as a movie. One of required features is to set two of the components of a pixel equal to the third. E.g, my pixel in RGB format is (100,200,255), I want to set the the R and B va...

image too sharp when zoomed out

I have a zoomable/scrollable image that is of high quality. When i zoom out, the image looks way too sharp. Is there a way to blur the image out a bit so i can code it to blur when it reaches a certain zoom level or is there a better way to go about this? For now i actually have a lower res version of my image that loads when the user hi...

Convert ColorConvertedBitmap to byte array in C#

I need to get the byte array from my ColorConvertedBitmap representing the bitmap. I was trying to use CopyPixels method but with no success. How to complete this task and what is the best approach? Thank you in advance for the replies and hints! ...

Efficient byte[] to BitmapImage and vice versa conversion in C#.

Hi there, I need to get the BitmapImage from the byte array. Currently I'm working with MemoryStream (byte[] -> MemoryStream -> BitmapImage) but it seems to be not efficient. The same situation in the other way round - I need to get the byte array representing the BitmapFrame. Again, I'm doing that with MemoryStream. What is the most...

How to draw a bitmap on Android using OpenGL

Hi all, I have a byte array of RGB values, just like the contents(without header) of a *.bmp file. What I want to do is, draw the corresponding bitmap on Android, using OpenGL. It seems that OpenGL ES doesn't have a single API that will do, it true? If true, how can I do this? PS: Actually, I can draw it in JAVA code, but it's too s...

BitmapFactory.decodeStream(inputStream) always return null when some bytes are wrong.

Hi there! I'm building an android app and I'm currently having trouble retrieving a bitmap from an URL. Here is the code I'm using : public static Bitmap bmpFromURL(URL imageURL){ Bitmap result = null; try { HttpURLConnection connection = (HttpURLConnection)imageURL .openConnection(); connection.setDoInput(t...

interpretation of sizes of fields (bitmap) ISO8583

What should be the correct interpretation for the sizes of each bit represents : Bitmap attribue length in bytes 1 b 1 16 (every two, representing a binary byte) 52 b 64 ??? 64 b 64 ??? 65 b 1 ??? (will be 16 too ?) 96 b 64 ??? 128 b 64 ??? Need to implement the treatmen...

Can you set a DDB on Static Picture Control

I have the picture control created with SS_BITMAP style and bitmap created on a memory DC. so can or how can you set the HBITMAP of a DDB for the control? It doesn't work with using: Edit: HDC hDC = GetDC(hPB); //hPB, Handle to static control. HDC hMemDC = ::CreateCompatibleDC(hDC); HBITMAP hDDB = ::CreateCompatibleBitmap(h...

Calculate the bounding box of a GDI+ drawing for bitmap export

I have a .NET Windows.Forms diagram editor that can export its diagrams as bitmaps. It also comes with a command line utility that just converts diagrams to bitmap images. I don't want to scale the diagram to a given bitmap size; instead, I want to size the bitmap based on the diagram's bounding box. I can easily determine it after dra...

android how to save a bitmap - buggy code...

Hi, Im trying to serialize a class in wich i have a bitmap variable. Here is the code that is a bit working.... I need help to find out what is still wrong..... private Bitmap myVideoScreenshotBm; private void writeObject(ObjectOutputStream out) throws IOException{ out.writeInt(myVideoScreenshotBm.getRowBytes()); out.writeInt(...

Convert View to bitmap FileNotFoundException problem

I'm trying to convert my LinearLayout to a bitmap so that I can save the current layout content as an image in SD card. First, I create bitmap and canvas and attach the layout to the canvas. Followed steps from http://www.brighthub.com/mobile/google-android/articles/30676.aspx#comments. //code to add child view into layout before creat...

Wrapping a bitmap byte array with BitmapImage in C#.

Hi there, the problem is as follows: I have got a rendered bitmap in a byte array (together with the bitmap header). Now I want to manipulate the content of a bitmap. For that purpose I need to wrap this array with some high-level class, say BitmapImage . I want to avoid copying the array, or its data part etc. I want just to force .N...