Better thumbnail quality with less size – see how

21 במאי 2008

 I found very cool post that show how to obtain quality and better compression with a little tuning and less automation. here's the code:    System.Drawing.Image myThumbnail = CreateThumbnail(myBitmap,Width,Height,false);                    //Configure JPEG Compression Engine                System.Drawing.Imaging.EncoderParameters encoderParams = new System.Drawing.Imaging.EncoderParameters();                long quality = new long;                quality = 75;                System.Drawing.Imaging.EncoderParameter encoderParam = new System.Drawing.Imaging.EncoderParameter(System.Drawing.Imaging.Encoder.Quality, quality);                encoderParams.Param = encoderParam;                System.Drawing.Imaging.ImageCodecInfo arrayICI = System.Drawing.Imaging.ImageCodecInfo.GetImageEncoders();                System.Drawing.Imaging.ImageCodecInfo jpegICI = null;                for (int x = 0; x < arrayICI.Length; x++)                {                    if (arrayICI.FormatDescription.Equals("JPEG"))                    {                        jpegICI = arrayICI;                        break;                    }                }        myThumbnail.Save(Path.Combine(SavePathThumb, fileName), jpegICI, encoderParams);                myThumbnail.Dispose();  
תגיות: ,
אין תגובות

Losing sessions? AppDomain restarts? Here's the solution

 Some web developers don't aware that some anti viruses by scanning the web.config file (or other asp.net watched files) initiates AppDomain restarts and as a result the performance problems (cache is reset as well, naturally),  various crashes and "unexplained" behavior. The solution is simple – exclude asp.net hosted directory from the AV scans, however in order to detect this issue or analyze the severity and recurrence of the problem you'll need to write some very neat code – see ScottGu's Blog for more information.
תגובה אחת

Visual Studio 2008 SDK 1.1 Beta released

20 במאי 2008

 Visual Studio 2008 SDK is now online.  The latest version can be downloaded here.Some of the new/updated features: ·         Significant reduction in size for Visual Studio Shell redistributable packages. The Visual Studio Shell Isolated and Visual Studio Shell Integrated redistributables are now approximately 150 megabytes smaller. The redistributables no longer carry the full .NET Framework 3.5 payload. However, they contain a bootstrapper that automatically downloads the .NET Framework 3.5 runtime if it is not installed on the target computer. ·         Support for progress feedback in a chained installation. The Visual Studio Shell Isolated and Visual Studio Shell Integrated redistributables can now pass installation progress back to the chaining process....
תגיות: ,
אין תגובות

Service broker issue: messages are dropped due to licensing when both sides are Sql Server Express edition

14 במאי 2008

Today I had a strange behavior with service broker between two SQL's in express version. The receiving side dropped the messages with the following error (profiler) "This message has been dropped due to licensing restrictions."I googled the issue and found the reason: "SQL Server Express can use Service Broker only in combination with other SQL Server 2005 editions"; It's good to know... 
אין תגובות

Storyboard Designer – A Visual Studio Shell (and DSL) application sample

For those of you that want to dig in to DSL and VShell and don't know where to start comes to the rescue the following sample application. "The Storyboard Designer is a sample application running on top of the VS Shell Isolated mode. It is composed of a DSL with many UI customizations, a custom project and custom VS templates. The purpose of this sample is show how to integrate existing VSX and DSL assets to a VS Shell Isolated application."  Enjoy
תגיות: , ,
6 תגובות

VSCTPowerToy

 I came across a great tool for the VS Package developers among us. This visual tool is currently a read only (for review/ debug) but has a set of great features that can be very useful. Quote:  "The VSCT (Visual Studio Command Table) PowerToy is a read-only viewer that you can use to explore the commands associated with a VSPackage, and with Visual Studio itself. You can quickly search for any existing commands in the Visual Studio IDE. By browsing through the command groups, GUIDs and IDs, priorities, and other properties of existing commands, you can more easily place and integrate the commands of your own VSPackage." You can...
תגיות: ,
אין תגובות

Service Broker Troubleshooting

I've gathered various posts discussing all kinds of problem and resolutions when dealing with service broker. A very useful query for message pileup in the queue is this one (100% mine :-) ): SELECT is_initiator, s.name as 'local service',  far_service, count(*) as conversations, sum(msg.messages) as messages FROM                 sys.conversation_endpoints ce left join sys.services s on ce.service_id = s.service_id inner join (                                 SELECT count(*) as messages, conversation_handle                                 FROM                                   GROUP BY conversation_handle )  as msg on msg.conversation_handle = ce.conversation_handle GROUP BY is_initiator, s.name, far_service Extenral link #1: Troubleshooting tools External link #2: Troubleshooting External link #3: Conversation troubleshooting External link #4: Queries for troubleshooting
אין תגובות