system.drawing

.NET System.Drawing differences in Windows Server 2008R2 64bit compared to all other windows (image is broken in 2008R2-64 but not other Windows)

吃可爱长大的小学妹 提交于 2019-12-25 03:52:47
问题 I have been given a development PC that has Windows Server 2008R2 64bit (x86) installed, so it is used as a workstation. My development environment is VS2008 targeting .NET3.5 (YES, 2008 !!!) In our website (which is a few years old now) there is a in-house developed Captcha. To cut a long story short, the letters are not outputted on my dev machine 2008R2-64 but on all other windows (our test & live servers are 2003 64bit) and Virtual PC's (2008 32bit NOT R2, XP, Win7) they are. I have seen

Bitmap from Drawing not render outside of Load_Form

我们两清 提交于 2019-12-25 02:57:14
问题 I'm trying to render bitmap created from drawing to screen but only render after minimize and maximize again. I follow these steps: Using Bitmaps for Persistent Graphics in C# But only can render bitmap in screen outside of Load_Form. If I put the code: using System.Drawing; ... Graphics graphicsObj; myBitmap = new Bitmap(this.ClientRectangle.Width, this.ClientRectangle.Height, Imaging.PixelFormat.Format24bppRgb); graphicsObj = Graphics.FromImage(myBitmap); Pen myPen = new Pen(Color.Plum, 3);

Improving performance when working on Images with ASP.NET in VB

混江龙づ霸主 提交于 2019-12-25 00:32:09
问题 I am trying to speed up various aspects of my website. The site is a shopping site various search pages which are slow. There are several potential reasons for this, one being working with images. The other night I created a function which generates a thumbnail for my Facebook OG tags. The function writes a square image to the server 400px x 400px created by tiling the first few (up to 14) product images generated by a search query. Running this script in total isolation on a test.aspx file

Reliable .wmf/wmf to Pixel based image conversion

百般思念 提交于 2019-12-24 20:50:30
问题 Good afternoon, I am having a little trouble with .net's internal (System.Drawing) based MetaFile / Image handling of .wmf files that containt transparent areas. Basically whenever I do a MetaFile.LoadFile(...) and take that to save it as a tiff/png etc, some areas of that source files are missing. I can't really pin it down, but it -seems- like the vector based informations within the metafile just work fine, but the pixel-based areas (e.g. an image placed within the .wmf) are missing. Does

Customize TabPage tabs like Process Flow Arrows in Microsoft Dynamics CRM 2015

本小妞迷上赌 提交于 2019-12-24 16:29:58
问题 I want my TabControl in a Windows Forms app to look something like this: https://technet.microsoft.com/en-us/library/dn531164.aspx I have an app that has process flow and each TabPage is a process phase that I want to represent with these nice looking arrows. I know about OnPaint and System.Drawing, but I cannot make those tabs look decent. I tried to handle TabControl.DrawItem event and to draw an arrow, but I am not satisfied with the look. private void tabControl1_DrawItem(object sender,

Can not use System.drawing.common in Mono.Android and Xamarin.ios

旧巷老猫 提交于 2019-12-24 16:07:26
问题 I am using System.drawing.common in my project, and it worked fine in .net core. Now I am trying to use System.drawing.common in Mono.Android project and Xamarin.ios project. Some problem occured: 1, I create a Mono.Android lib project, and install System.drawing.common with NuGet. It seems to be successful, but after installing, I can not find System.drawing.common in the "reference" list. I tryed to use "System.Drawing.Bitmap", but can not find Bitmap class. 2, I checked the package folder,

Trying to iterate over the frames in a System.Drawing.Image, throws invalid parameter exception

ⅰ亾dé卋堺 提交于 2019-12-24 03:44:14
问题 I'm trying to use Bar Code Recognition software and need to iterate over all the frames in a tiff file. I am confused on several points: 1) What is a frame, why does it have a guid and why do I need to iterate over frames? I can't seem to find a lot of documentation. 2) The code throws an invalid parameter exception after one iteration. I'm not sure why; logically, i cannot exceed the frame count, so not sure how it could be an invalid parameter, assuming that is the problem. System.Drawing

PrivateFontCollection with gdi+ sometimes uses the wrong FontStyle in WIndows 8 or newer

情到浓时终转凉″ 提交于 2019-12-24 03:09:14
问题 If you have a Font which you've created from a PrivateFontCollection and try to draw strings with it using GDI+ it will sometimes use the wrong FontStyle. I've observed this both with Fonts loaded into a PrivateFontCollection from memory and fonts loaded into PrivateFontCollection from files. In my following example I'm loading fonts from file. I have them all in a folder called Fonts. if we would load them like below. private void loadFontsIntoPrivateCollection() { _privateFontCollection =

PrivateFontCollection with gdi+ sometimes uses the wrong FontStyle in WIndows 8 or newer

江枫思渺然 提交于 2019-12-24 03:09:03
问题 If you have a Font which you've created from a PrivateFontCollection and try to draw strings with it using GDI+ it will sometimes use the wrong FontStyle. I've observed this both with Fonts loaded into a PrivateFontCollection from memory and fonts loaded into PrivateFontCollection from files. In my following example I'm loading fonts from file. I have them all in a folder called Fonts. if we would load them like below. private void loadFontsIntoPrivateCollection() { _privateFontCollection =

Calculate coordinates for rotated text plus bounding border

巧了我就是萌 提交于 2019-12-24 01:44:26
问题 I have a form that is going to allow a user to create custom "stamps" to place on a PDF. The form displays with a image of the first page of the pdf and I want the user to basically click on the screen where they want their stamp and be able to preview what its going to look like. Don't worry about any of the PDF stuff, I have that handled. To make things snazzy, I have two copies of the image, the normal one and one with reduced brightness. I display the low brightness image and as the user