C # image cropping without .net library

Can anyone advise how to crop an image, say jpeg, without using any .NET framework constructs, just raw bytes? Since this is the only way in Silverlight ...

Or point to a library?

I'm not interested in rendering. I want to manipulate jpg before downloading.

* There are no GDI + (System.Drawing) or WPF (System.Windows.Media.Imaging) libraries in Silverlight.

Lockbits requires GDI +, clarified question

Using fjcore: http://code.google.com/p/fjcore/ to resize, but without the ability to crop :(

+5
source share
4 answers

fjcore. Resizer

http://code.google.com/p/fjcore/source/browse/trunk/FJCore/Resize/ImageResizer.cs

FilterNNResize - , - .

:

    for (int y = 0; y < _newHeight; y++)
    {
        i_sY = (int)sY; sX = 0;

        UpdateProgress((double)y / _newHeight);

        for (int x = 0; x < _newWidth; x++)
        {
            i_sX = (int)sX;

            _destinationData[0][x, y] = _sourceData[0][i_sX, i_sY];

            if (_color) {

                _destinationData[1][x, y] = _sourceData[1][i_sX, i_sY];
                _destinationData[2][x, y] = _sourceData[2][i_sX, i_sY];
            }

            sX += xStep;
        }
        sY += yStep;
    }

, (1 8bpp , 3 ), 2- (x, y) .

, .

edit: fjcore

+3

ImageMagick . ...

(? Silverlight - ? ... .)

+2

I look at: http://code.google.com/p/fjcore/source/checkout Library of the image processing library without dependency.

+2
source

where does silverlight run? Is there any reason at all to send the full picture to the client so that the client cuts it off? Do it on the server ... (unless you create an image editor that ...)

0
source

All Articles