Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...CPU Usage problem - Graphics.DrawImageCPU Usage problem - Graphics.DrawImage
Previous
 
Next
New Post
10/29/2012 6:34 PM
 

hello,

i also use another image and the same problem occured.

here is my code :


nt newWidth = 0;
            int newHeight = 0;
            int currWidth = 0;
            int currHeight = 0;

            using (MemoryStream memoryStream = new MemoryStream(i_Image))
            {
                using (System.Drawing.Image image = System.Drawing.Image.FromStream(memoryStream, false, false))
                {
                    currWidth = (int)image.PhysicalDimension.Width;
                    currHeight = (int)image.PhysicalDimension.Height;

                    if (currHeight >= k_MaxImageRowHeight && currWidth >= k_MaxImageRowWidth)
                    {
                        if (Convert.ToDouble(k_MaxImageRowWidth) / Convert.ToDouble(currWidth) > Convert.ToDouble(k_MaxImageRowHeight) / Convert.ToDouble(currHeight))
                        {
                            newHeight = k_MaxImageRowHeight;
                            newWidth = currWidth * k_MaxImageRowHeight / currHeight;
                        }
                        else
                        {
                            newWidth = k_MaxImageRowWidth;
                            newHeight = currHeight * k_MaxImageRowWidth / currWidth;
                        }
                    }
                    else if (currHeight >= k_MaxImageRowHeight)
                    {
                        newHeight = k_MaxImageRowHeight;
                        newWidth = currWidth * k_MaxImageRowHeight / currHeight;
                    }
                    else if (currWidth >= k_MaxImageRowWidth)
                    {
                        newWidth = k_MaxImageRowWidth;
                        newHeight = currHeight * k_MaxImageRowWidth / currWidth;
                    }
                    else
                    {
                        newWidth = currWidth;
                        newHeight = currHeight;
                    }

                    DotNetNuke.Common.Utilities.ImageUtils.CreateImage(i_FileFullNameAndPathInServer, newHeight, newWidth);
                    DotNetNuke.Common.Utilities.ImageUtils.CreateImage(i_FileFullNameAndPathInPongoWebsite, newHeight, newWidth);

thank you,

adi damty

 
New Post
10/29/2012 7:39 PM
 
The reason I asked about the images was I've had similar problems in the past as discussed in this thread:

http://social.msdn.microsoft.com/foru...

Scott McCulloch
Developer, F5 Networks
Owner, Ventrian DotNetNuke Modules
 
New Post
10/30/2012 7:28 AM
 

Hello Scott,

thank you for your time.

the problem is that this function cause the same problem as using Grapichs ( becuase both using the same function ), 

i don't know if it's a problem because when i use debug in visual studio it's all working without any errors, 

and if i call the website without debug it's also working, but with the windbg i saw exception in this function as i mention.


thank you,

adi damty

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...CPU Usage problem - Graphics.DrawImageCPU Usage problem - Graphics.DrawImage


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out