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

  • SEARCH
  • Home
  • 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 6542089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:11:01+00:00 2026-05-25T11:11:01+00:00

I’m using ImageTools for Silverlight to load a JPG image, but the decoded image

  • 0

I’m using ImageTools for Silverlight to load a JPG image, but the decoded image quality is BAD (no anti-aliasing, see the second image in the red square).

Here is my code:

OpenFileDialog dlg = new OpenFileDialog();

if (dlg.ShowDialog() == true)
{
    var stream = dlg.File.OpenRead();
    var newImg = new ExtendedImage(); // ExtendedImage is a ImageTools Api class
    var d= new ImageTools.IO.Jpeg.JpegDecoder();
    d.Decode(newImg, stream);
    image1.Source = newImg.ToBitmap(); //image1 is a System.Windows.Controls.Image
}

Source image

this is the source image

Bad result

this is the bad result

Observations

If I set image1.source directly to a URL from the original image, the image is rendered correctly!

Is this a bug in the ImageTools API?

The problem is posted on Codeplex, but it doesn’t have any answers.

If I rewrite my code, I get the same result.

XAML

<UserControl x:Class="JPGDecoder.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">

<Grid x:Name="LayoutRoot" Background="White">
    <Image Height="120" HorizontalAlignment="Left" Margin="46,75,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="160" Source="/JPGDecoder;component/Images/org.jpg" />
    <Image Height="120" HorizontalAlignment="Left" Margin="212,75,0,0" Name="image2" Stretch="Fill" VerticalAlignment="Top" Width="160" />
    <Button Content="Decode JPG from File Stream" Height="23" HorizontalAlignment="Left" Margin="44,25,0,0" Name="button1" VerticalAlignment="Top" Width="192" Click="button1_Click" />
</Grid>

C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using ImageTools;

namespace JPGDecoder
{
public partial class MainPage : UserControl
{
    public MainPage()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, RoutedEventArgs e)
    {
        var dlg = new OpenFileDialog();

        if (dlg.ShowDialog()==true)
        {
            var stream = dlg.File.OpenRead();
            var newImg = new ExtendedImage();
            var d = new ImageTools.IO.Jpeg.JpegDecoder();
            d.Decode(newImg, stream);
            image2.Source = newImg.ToBitmap();
        }
    }
}
}

Result

enter image description here

  • 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-25T11:11:02+00:00Added an answer on May 25, 2026 at 11:11 am

    ImageTools does not support antialising, so I got FJCore from Subversion and ran the sample app.

    1. First test same result, bad quality.
    2. Looking at the source code, I found this code block:

      // Resize
      DecodedJpeg jpegOut = new DecodedJpeg(
          new ImageResizer(jpegIn.Image).Resize(320, ResamplingFilters.NearestNeighbor),
          jpegIn.MetaHeaders); // Retain EXIF details
      

      and changed it to this:

      //Resize
      DecodedJpeg jpegOut = new DecodedJpeg(
          new ImageResizer(jpegIn.Image).Resize(320, ResamplingFilters.LowpassAntiAlias),
          jpegIn.MetaHeaders); // Retain EXIF details
      

    This is the solution: ResamplingFilters.LowpassAntiAlias

    Thanks everyone!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build

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.