bitmap - Image preview after capturing from camera in windows store app not working after 3rd time

I am capturing photo in my windows store metro app using Media Capture Api.Photo capturing correctly first it is saving in local storage then showing in bitmap image . Here is my code .Windows.Media.Capture.MediaCapture captureManager; protected async override void OnNavigatedTo(NavigationEventArgs e) { captureManager = new MediaCapture(); await captureManager.InitializeAsync(); capturePreview.Source = captureManager; await captureManager.StartPreviewAsync(); base.OnNavigatedTo(e); ...Read more

how to use Bitmap for Xamarin.Forms?

How can I use bitmap from Xamarin Forms? This is used to be on my Android project, but I would like to use something like this from Xamarin Forms. I don't want to do any renders or platform specific. If I can just do it in Forms will be great. Any idea?review forms : private async void GetIcon() { Weather weather = await Core.GetWeather(); var bitmap = new Image { Source = ImageSource.FromUri(new Uri("http://openweathermap.org/img/w/" + weather.Icon + ".png")) };DisplayIcon.bitmap ? }xaml : <Image x:Na...Read more

bitmap - Quick view/preview/outline mode in Photoshop

I have a pretty large PSD I got from a designer that includes a lot of groups containing three overlay layers (to create a specific lighting effect). I need to duplicate these groups and and position them around. The problem is, these effects bring Photoshop to a halt. Moving a group of 30 of these groups locks up PS for minutes at a time.So, my question is: is there a way to switch Photoshop into some sort of preview mode (akin to the Outline mode in Illustrator), with lower-quality rendering (or even layer outlines) so I can position these it...Read more

pdftron - Retrieving pdf page bitmap with its original size and dpi

I'm wondering why i'm getting a bitmap from a page that has a different size/dpi than the bitmap i used to create the page.example: bmp is a Bitmap with a Width of 1275 and Height 1651 at a dpi of 150. I use this bitmap to create the page. When i use PDFDraw to retrieve the Bitmap at the end of my code, Bitmap b has a Width of 2657 and height of 3440 at 150 dpi. Why has this changed and how can i get my original bitmap back?//create a pagevar imgRect = new Rect(0, 0, bmp.Width, bmp.Height);pdftron.PDF.Page _currentPage = convertedPdf.PageCreate...Read more

gdi - How to perform high quality bitmap scaling in Direct2D?

I am trying to move an application from GDI+ to Direct2D for performance reasons.Perviously I was using StretchBlt() in HALFTONE mode which gives great, but slow results.Now I am drawing in Direct2D with RenderTarget->DrawBitmap() but it only has two modes, LINEAR and NEAREST_NEIGHBOR, neither which are very good. LINEAR is better but still produces awful artifacts. Does Direct2D have any high quality scaling options? If not, am I better off sticking with GDI or is there another option? This is a Windows application running in a window with...Read more

bitmap - Accurately mapping pixels scaled by Graphics.DrawImage

I have a Winforms application that uses Graphics.DrawImage to stretch and draw a bitmap, and I need help understanding precisely how the source pixels map to the destination.Ideally I want to write a function like: Point MapPixel(Point p, Size src, Size dst)which takes a pixel coordinate on the source image and returns the coordinate of the "upper-left" pixel corresponding to it on the scaled destination.For clarity, here's a trivial example where a 2x2 bitmap is scaled to 4x4:The arrow illustrates how feeding the point (1,0) into MapPixel:MapP...Read more

bitmap - Resize a Sprite image in Haxe?

I am developing a small game using Haxe and box2d. I am rescaling the player body which is a sphere, while the player is in contact with a particular object, but I am trying to scale the image as I scale the body. public function new(w:Int, x:Int, y:Int) { super(); this.w = w; this.x = x; this.y = y; var imgSprite = new Sprite(); imgSprite.addChild(new Bitmap(Assets.getBitmapData("img/ball.png"))); imgSprite.x = -w; imgSprite.y = -w; this.addChild(imgSprite); this.alpha = .5; contactList = new Array<B2Body&...Read more

Android Desire HD Bitmap Scaling

I've build a custom camera activity where the user can take a picture. The picture is saved in the external storage directory via the picture callback. The user is then redirected to another activity where he can preview the picture. Before the preview is shown, the picture is scaled down in a seperate thread to a certain maximum dimension. Here is the scaling code:byte[] tempStorage = new byte[16 * 1024];BitmapFactory.Options options = new BitmapFactory.Options();options.inJustDecodeBounds = true;BitmapFactory.decodeFile(imagePath, options);in...Read more

Workflow Foundation 4 in VS 2015 - Activity toolbox bitmaps don't show

I have read multiple tutorials/blogs/stackoverflow question about this, including the following:http://geekswithblogs.net/jkurtz/archive/2010/01/26/137639.aspxhttp://blogs.msdn.com/b/tilovell/archive/2011/05/08/iregistermetadata-and-best-practice-associating-workflow-activity-designers.aspxhttps://msdn.microsoft.com/en-us/library/dd489419(v=vs.110).aspxhttp://blogs.msdn.com/b/rjacobs/archive/2011/08/14/how-to-create-a-custom-activity-designer-with-windows-workflow-foundation-wf4.aspxCreating custom activity design without reference to Design DL...Read more

bitmap - How do I interpret HRESULT -2003292276?

How do I interpret HRESULT -2003292276? This is returned by calling IWICFactory factory->CreateBitmapFromMemory():hr = m_factory->CreateBitmapFromMemory( m_format.imageWidthPels, m_format.imageHeightPels, GUID_WICPixelFormat32bppBGR, m_format.strideSize, cbBitmapData, data, &pBitmap);...Read more

How to save a bitmap as 16-bit in Maxscript?

I want to read out the z-buffer of camera, and render it as an image. I could achieve it with the following code:--Place the z cameraz_cam = freecamera name: "depth" position:[0.0,0.0,50.0] rotation: (eulertoquat (eulerAngles 0 0 0))z_name = "mybitmap.png"--get z buffer rbmp = render outputsize:[512,424] channels:#(#zdepth) vfb:off camera: z_camz_d = getchannelasmask rbmp #zdepth outputfile:z_name z_d.fileName = z_namesave z_dclose z_dHowever, this will save the image as 24-Bit Png, with 3 Channels (8 bit each channel). I wish to sav...Read more

wxpython - wx.panel does not show the background bitmap

I have problem with wxpython on showing panel background images. I declared a wx.frame of size 800x600 on my win10 surface pro. Then in the frame, I first declared a background panel of the same size. I then filled its staticbitmap with a bitmap of the same size. Then I declared a little panel of size 320x320 in the middle bottom. I also filled in its staticbitmap with a bitmap of 320x320. But somehow the first background panel is always the background color (240,240,240,255) without the picture that I put in its staticbitmap. However, the pict...Read more

bitmap - Crash of BitmapDecoder when processing DDS files

I wanted to test my application on the computer of a friend to check, if my work on runs on other peoples' machine. (Do I have included all libraries? Etc.)However, my application crashes when I load *.dds textures. I use them in the 2D background of my scene. Here is the code I am using to load a DDS texture and convert them to Bitmaps:using (SharpDX.WIC.BitmapDecoder bitmapDecoder = new SharpDX.WIC.BitmapDecoder(ImagingFactory, new MemoryStream(iconInfo.Data, false), SharpDX.WIC.DecodeOptions.CacheOnDemand)){ using (SharpDX.WIC.FormatConve...Read more

directx - How to turn mipmap data into a bitmap?

I have a .DDS texture file with a format of DXGI_FORMAT_BC3_UNORM that contains 10 mipmaps which I have linked here:https://1drv.ms/u/s!AiGFMy6hVmtN1Ba3UZsc8682VcEOI would like to display each individual mipmap of this texture to my XAML app's UI, so I need to convert them to bitmaps.I am getting the data for each mipmap from the 5th parameter of the DirectX::LoadDDSTextureFromMemory function from DirectXTK12 helper library which returns a std::vector<D3D12_SUBRESOURCE_DATA> filled with the data for all 10 mipmaps.I am able to turn the hi...Read more

bitmapimage - How can I extract the palette from a 5-6-5 bitmap image?

I am trying to extract the palette from a 5-6-5 (16bit) bitmap image that I have produced using ImageConverter Plus from an original Photoshop file. I need to read out the palette and compare it to the palette I have elsewhere for another image.Is there a piece of freeware (or not) software that can do this? I can read palette files in .pal and .act format with another piece of software, but I would like to generate one of these files from the bitmap in the first place!Thanks,GeorgeTo add further information:I start with an 8-bit PNG in Photos...Read more