Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6386269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:00:14+00:00 2026-05-25T03:00:14+00:00

I build a file uploader using silverlight and http://imagetools.codeplex.com/ . Its all ok, but

  • 0

I build a file uploader using silverlight and http://imagetools.codeplex.com/.

Its all ok, but my final file is about 300KB(size) with an 400 x 300(resolution).

When i open it on MS Paint and Save It as jpg again the size is set to normal.

my suspect is de enconde o file is a (png) but i don’t now how.

My Code:

        public static byte[] resize(string extension,int width,int height,int orientation)
    {
        //Decoders.AddDecoder<BmpDecoder>();
        //Decoders.AddDecoder<PngDecoder>();
        Decoders.AddDecoder<JpegDecoder>();
        //Decoders.AddDecoder<GifDecoder>();

        var newImg = new ExtendedImage();
        if (orientation == 0)
            newImg = ExtendedImage.Resize(img, width, height, new ImageTools.Filtering.NearestNeighborResizer());
        else  
            newImg = ExtendedImage.Resize(img, height, width, new ImageTools.Filtering.NearestNeighborResizer());


        //newImg = applyWaterMark(newImg);
        //var s = new MemoryStream();
        var s = newImg.ToStreamByExtension(extension);
        return ReadFully(s); 
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:00:14+00:00Added an answer on May 25, 2026 at 3:00 am

    solved!!

    var e = new ImageTools.IO.Jpeg.JpegEncoder();
    var s = new MemoryStream(); e.Quality = 90;
    e.Encode(newImg,s);
     //var s = newImg.ToStream();
     return s.GetBuffer(); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using an ant build file that has been generated by android. Our Android
We have inherited an ant build file but now need to deploy to both
I'm trying to build an HTML5 file uploader that supports large files via chunks.
I am trying to build a file uploader. I already have a working multi-select
I'm using Uploadify and Kohana and I'm creating file uploader. User can upload only
Interested in building my own drag'n'drop file uploader using JQuery/AJAX/PHP. Basically I want a
I have a Nant build file which executes NUnit after compiling the dll's. I
I have a simple NAnt build file, which attempts to perform an update from
I am experimenting with the build file that is part of a web deployment
When you define an extension-point in an Ant build file you can have it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.