.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

What is the ratio of inch per pixel and Millmeter per pixel

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :Windows Application
 
As subject.......


View Complete Post


More Related Resource Links

Get pixel format, raw format, property id list and property items image in VB.net - C#.net.

  
n this simple article you will learn that how we can get pixel format, raw format, property id list and property items image in VB and C#.net.

Get Pixel Format:

Image consists of pixels to get the format of the pixel we have a property named pixel format. This property returns an enumeration of pixel format. This enumeration tells the pixel format.

To demonstrate make a window application. Drag one button and a picture box on form.

Now write the following code on Button click event:

Foundations: Bitmaps and Pixel Bits

  

Charles Petzold takes an inside look at the flexible bitmap pixel formats offered by the retained-mode graphics features of Windows Presentation Foundation.

Charles Petzold

MSDN Magazine June 2008


Text and graphical elements have added/subtracted/shifted pixel

  
i did something while making a bunch of changes to this application, and now users are reporting shifted/added pixels.  see http://twitpic.com/2k5o9w/full -- notice the white border and image have shifted/added pixels at the top and the text at the bottom also has extra pixels added in. i've tried with and without SnapsToDevicePixels; i don't think that's it? same with RenderingOptions.TextMode. i know it's something i did, though because it did use to be OK (of course). this does NOT happen when we force software rendering, and the machines it's happening on have the latest video drivers (as i understand it, they both have ATI cards, but i'm using an ATI card [a different one] on my laptop and it's fine for me).  it's just a pain because it doesn't happen on all machines, including mine, even though all machines we're trying it on are rendering tier 2. i'm sure it's something stoopid i did, but i can't figure it out. thanks in advance for any suggestions/help! --jon

click event only firing for lower 100 pixel portion of vertical div

  
 I have a div on the left side of my page. when clicked I toggle a hidden div that flies out to the right. But the click event only works on the bottom portion of the div. The hidden div has a close button div in the lower right. to clicks fine. any ideas? code is below jquery <script type='text/javascript'> $(document).ready(function() { var $scrollingDiv = $("#divReportBanner"); $(window).scroll(function(){ $scrollingDiv .stop() .animate({"top": ($(window).scrollTop()) + "px"}, "fast" ); }); $('.toggle-button').click(function() { $("#divLeftMenuBody").animate({width:'toggle'},400); }); $('#divReportBanner').click(function() { $("#divLeftMenuBody").animate({width:'toggle'},400); }); }); </script> html <div id="divReportBanner" ></div> <div id="divLeftMenuBody" runat="server"> <div style=" overflow: scroll; overflow-x:hidden;width:365px; height:370px;">

Pixel Shader in WPF, are user created shaders run on hardware or in software?

  
In general, are user made shaders used in WPF, are they run on the video cards hardware? or are they all run in software mode?   I think I read that the default shaders are run in hardware but that user made shaders are not?

Pixel-Perfect 3D Geometry

  

Hi, 

I have some 3D UserControls in a Viewport3D using Viewport2DVisual3D. Some of them are images that need to be displayed in a pixel-perfect way to prevent blurring.

Is there a way to do this? The mesh geometry is defined in space coordinates and I don't know they relate to pixels: 

<MeshGeometry3D Positions="-1,1,0 -1,-1,0 1,-1,0 1,1,0" TextureCoordinates="0,0 0,1 1,1 1,0" TriangleIndices="0 1 2 0 2 3"/>

 

Thanks!


'No information was found about this pixel format error' on image binding

  
I've read all the posts I could find on this error but I'm still stumped.

I have a user control with a dependency property named Image.

In the user control I have a stack panel that contains an image and I set the binding in the xaml

<Image HorizontalAlignment="Center" Margin="3,0,0,0" Width="85" Height="75" Source="{Binding ElementName=UserControl, Path=Image}"/>

In a code behind I try to set the image for an instance of this control named WeatherNB

                BitmapImage bi1 = new BitmapImage();
                bi1.BeginInit();
                bi1.UriSource = new Uri(currentImage, UriKind.Relative);
                bi1.EndInit();
                this.WeatherNB.Image = bi1;

but I get the following error

Unhandled Exception: System.NotSupportedException: No information was found about this pixel format.
   at System.Windows.Media.PixelFormat.CreatePixel

Problem with Pixel Shader 3.0 support in WPF SP1.

  
I've tried custom effects in WPF with .NET 3.5 SP1. It's amazing feature!
But I tried to compile my pixel shader with ps_3_0 profile and then WPF application throws exception.
So, if I have graphics card with support ps_2_0, ps_3_0 and even ps_4_0, can I use pixel shader profile 3_0 or it's impossible today in WPF? If it's impossible - why? and will WPF dev team provide ps_3_0 support in future releases?

Can Pixel-shader 3.0 based shader effect be used to render to a RenderTargetBitmap?

  

Hello -

I have written a custom shader effect using PS 3.0 that is working great on screen, however I need to have the ability to create a 'snap shot' of the control and write it out to disk.  I have been attempting to use RenderTargetBitmap, however the shader is not being applied to the rendering.  In another forum on stack overflow I posted a similar question and was told that PS 3.0 does not have a software fall back.  I would like to hear from the MS community if that indeed is the case.  If it is, can someone out there tell me how to capture a control that has been rendered using a PS 3.0 pixel shader.  It would be best if I were able to render the control off screen rather than attempting to capture an image off of the screen.

I wrote a VERY simple program to test the ability to capture PS 3.0 rendering to a RenderTargetBit map.  the code is below:

Hopefully someone out there has a solution!  Unfortunately I can not fall back to PS 2.0...

 

namespace TestPixelShader
{
	/// <summary>
	/// Interaction logic for MainWindow.xaml
	

Change bitmap colors and shift it 1 pixel 25 times/sec

  

Hi

I'm struggling with WPF and need some help.

I want declare a bitmap and then change some pixels colors. Then I want to shift the displayed bitmap by one pixel and then change some other pixel colors. This I want to do about 25 times/sec.

I succeeded doing this using winforms which was quite easy (declare bitmap and and use the DrawImage() method to show the two bitmap segments correctly using rect(). I've tried to look for the same functionality in WPF but can't find it. I should be able to  this using winforms in WPF but that doesn't seem right as I'm guessing WPF you be able to support this.

 

Any hints?

 

Regards

Tom


How to find the xy coordinate of an element in a pixel array ?

  

Lets say that we copy the pixels of an image to an array as follows:

 

//Copy the pixels to the array
ImgSource.CopyPixels(PixelData, Stride, 0);

 

Now we have the image as a one dimensional array in PixelData. Is there a way to find out the (x,y) coordinate of each element in this array ?

I need this in order to determine which points in the array are within a specific x,y region.

 

 


Single Pixel Line Drawing

  
I have developed small programme with free hand mouse drawing. The line drawing is done with DrawLine method. Now I want to draw a line with single pixel thickness and pixels should be unconnected like one in this website --- http://www.cs.unc.edu/~mcmillan/comp136/Lecture6/Lines.html and it should be free hand mouse drawing. I have tried DDA algorithm method but it too draws line with connected pixels ( here the connected pixels i mean that the pixels should be only connected diagonally not top or bottom). I have tried pen thickness to -1 but still does not work. If any one have solution for this issue please help me.

SSRS 2008 - Grid Spacing For Pixel Formatting -How can we Set in SSRS 2008 ?

  

Hi Friends,

I have a question on - How can we set Grid Spacing for Pixels in SSRS 2008 ?

In SSRS 2005, Report Properties, We have Grid Spacing, Frm where we can Reduce Pixel distance in Design mode.

I am looking for the exact same property in SSRS 2008.

Any help greatly appreciated.

Thanks.


TypePerf, Buffer Cache Hit Ratio, Page Life expectancy and some other counters....

  
Hello, I 've scheduled a Task on a Windows 2008 R2 Server (a Blade with 2 Processors (6 core HT) and 18 GB RAM) to check some SQL Server 2008 Performance Counters. The task runs TypePerf that checks the Counters every 15 seconds for 10 minutes. The task is scheduled every hour. The strange result is that Buffer Cache Hit Ratio, Page Life expectancy and some other Counters are ALWAYS = 0 but if I run PerfMon, Buffer Cache Hit Ratio is 100 and  Page Life expectancy >>>> 300. Any Idea? Thank youLuca Bovo MCTS - MCITP SQL Server 2005 (Database Administrator and Database Developer)

Sharepoint 2010 Web Server/Domain Controller ratio

  
Is this number the same 3:1 as it was in with Sharepoint 2007?

MDX Ratio report

  
Hi Guys, I’d like to calculate the percentage ratio of dimension members but… it should be time dynamic … What I have so far… with member [Measures].[RatioToParent] As ( Sum (PeriodsToDate ( [Times].[Timeline].[Year ID], [Times].[2010-09-03] ),[Measures].[Encounter Count]) ) / ( [Measures].[Encounter Count], [Hosp].[Hospital].[ALL] ), Format = "Percent" select {[Measures].[Encounter Count], [Measures].[RatioToParent]} on columns, [Hosp].[Hospital].[Hosp].members on rows from [Hpm Reporting]   The query above should show for each hospital the ratio of the patient encounters form 01-01-2010 to 09-03-2010.  The issue I have is the denominator [Measures].[Encounter Count], [Hosp].[Hospital].[ALL];  The way the query above is written the denominator includes all the encounters for all times and that doesn’t makes sense. I’d like the total encounters over all hospitals also from 01-01-2010 to 09-03-2010…I tried different options to accomplish this but nothing worked so far… Any hint into the right direction would be much appreciated… Thx a bunch

mdx ratio of parent report

  
Hi Guys, I’d like to calculate the percentage ratio of dimension members but… it should be time dynamic … What I have so far… with member [Measures].[RatioToParent] As ( Sum (PeriodsToDate ( [Times].[Timeline].[Year ID], [Times].[2010-09-03] ),[Measures].[Encounter Count]) ) / ( [Measures].[Encounter Count], [Hosp].[Hospital].[ALL] ), Format = "Percent" select {[Measures].[Encounter Count], [Measures].[RatioToParent]} on columns, [Hosp].[Hospital].[Hosp].members on rows from [Hpm Reporting]   The query above should show for each hospital the ratio of the patient encounters form 01-01-2010 to 09-03-2010.  The issue I have is the denominator [Measures].[Encounter Count], [Hosp].[Hospital].[ALL];  The way the query above is written the denominator includes all the encounters for all times and that doesn’t makes sense. I’d like the total encounters over all hospitals also from 01-01-2010 to 09-03-2010…I tried different options to accomplish this but nothing worked so far… Any hint into the right direction would be much appreciated… Thx a bunch
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend