Git Product home page Git Product logo

docs's People

Contributors

aallen90 avatar agc93 avatar anthonybouton avatar antonfirsov avatar arebee avatar brianpopow avatar cload avatar damianmac avatar dependabot[bot] avatar dlemstra avatar egopingvina avatar engincanv avatar erikhen avatar georchw avatar jeremysimmons avatar jimbobsquarepants avatar kadamgreene avatar kant2002 avatar meziantou avatar mghini avatar natehitze avatar pauliver avatar peter-dolkens avatar prodehghan avatar rold2007 avatar seankilleen avatar sergey-v9 avatar sergio0694 avatar tocsoft avatar watfordsuzy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

Documentation navigation items not readable

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of ImageSharp
  • I have verified if the problem exist in both DEBUG and RELEASE mode
  • I have searched open and closed issues to ensure it has not already been reported

Description

The documentation is barly usable since most of the navigation items are cut off no matter how big the screen size is.
The column can't be resized so in order to read where to navigat to one has to hover over every single item.
https://i.imgur.com/xZUW0su.png

Steps to Reproduce

  1. Visit documentation on https://docs.sixlabors.com/api/ImageSharp/SixLabors.ImageSharp.Processing.html
  2. Navigate around

System Configuration

Windows 11; Edge & Firefox

  • ImageSharp version: Not applicable
  • Other ImageSharp packages and versions:applicable
  • Environment (Operating system, version and so on): Windows 11
  • .NET Framework version: applicable
  • Additional information: applicable

Problem with drawing documentation

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of ImageSharp
  • I have verified if the problem exist in both DEBUG and RELEASE mode
  • I have searched open and closed issues to ensure it has not already been reported

Description

When clicking drawing in the documentation website nothing happens:

Steps to Reproduce

Click here:
image

System Configuration

  • ImageSharp version:
  • Other ImageSharp packages and versions:
  • Environment (Operating system, version and so on):
  • .NET Framework version:
  • Additional information:

Is ImageSharp thread safe? - Document concurrent behavior

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of ImageSharp using 1.0.0-beta0007
  • I have verified if the problem exist in both DEBUG and RELEASE mode I have only observed this using the nuget package and does reproduce in both debug and release builds of test app
  • I have searched open and closed issues to ensure it has not already been reported

Description

If you attempt to perform operations (like use the SixLabors.ImageSharp.Processing.FillRectangleExtensions.Fill method) within a Parallel.For loop, many of the changes appear to be lost.

Steps to Reproduce

This appears to constantly reproduce the problem

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta0007" />
  </ItemGroup>

</Project>
using System;
using System.Threading.Tasks;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.Primitives;

namespace ParallelImage
{
    class Program
    {
        static void Main(string[] args)
        {
            const int width = 12;
            const int rowHight = 16;
            const int rows = 10;
            const string fileName = "out.jpg";

            using (Image<Rgb24> startImage = new Image<Rgb24>(Configuration.Default, width, rowHight * rows, Color.White))
            {
                using(Image<Rgb24> clonedImage = startImage.Clone(clone => {
                    Parallel.For(
                        fromInclusive: 0,
                        toExclusive: rows,
                        new ParallelOptions { MaxDegreeOfParallelism = args?.Length == 1 ? int.Parse(args[0]) : -1 },
                        (row) =>
                        {
                            clone.Fill(Color.Black, new RectangleF(0, row * rowHight, width, rowHight));
                        });
                }))
                {

                    clonedImage.Save(fileName);

                    Rgb24 black = Color.Black.ToPixel<Rgb24>();
                    int count = 0;
                    foreach(Rgb24 pixel in clonedImage.GetPixelSpan())
                    {
                        count++;
                        if (pixel.R != black.R)
                        {
                            Console.WriteLine(count.ToString());
                            return;
                        }
                    }

                    Console.WriteLine("No problems found");
                }
            }
        }
    }
}

This will create an image with a white background, and then draw black rectangles down the full height of the image. The image will be saved under 'out.jpg'. Then all the pixels are checked and reports the position of the first non-black one it finds.

dotnet run should demonstrate the problem by reporting the index of the first non-black pixel.

Running dotnet run 1 (which will set the MaxDegreeOfParallelism for the Parallel.For) will correctly set all of the pixels to black and will display No problems found

System Configuration

  • ImageSharp version: 1.0.0-beta0007
  • Other ImageSharp packages and versions: SixLabors.ImageSharp.Drawing
  • Environment (Operating system, version and so on): macOS Catalina 10.15.3
  • .NET Framework version: 3.1.101
~/Test/ParallelImage > dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.101
 Commit:    b377529961

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.15
 OS Platform: Darwin
 RID:         osx.10.15-x64
 Base Path:   /usr/local/share/dotnet/sdk/3.1.101/

Host (useful for support):
  Version: 3.1.1
  Commit:  a1388f194c

.NET Core SDKs installed:
  3.0.100 [/usr/local/share/dotnet/sdk]
  3.0.101 [/usr/local/share/dotnet/sdk]
  3.1.100 [/usr/local/share/dotnet/sdk]
  3.1.101 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.14 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.15 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
  • Additional information:

Vertival alignment by caps height and x-height

Feature request:

Hi guys i want to say first of all great work we have been using your library for some time and it works perfectly.
We have a feature sugestion you might be interested in.

It would be nice if we could align or at least get these mesurments from the TextMeasurer class

image

Documentation about rxy is not clear, and sample querystring is wrong(?).

Hi. Thank you for all the work you do with this library.
I wanted to use the rxy querystring when cropping images, but couldn't get it to work.
(https://github.com/SixLabors/docs/blob/master/articles/imagesharp.web/processingcommands.md/).
The sample code is "&rxy=30,30". But it's not clear in the documentation if that is pixels or percentage, or something else.
After some testing it seems that the values should actually be between 0-1. So, the sample querystring should be "&rxy=0.30,0.30" if you want the anchor point to be 30% top and 30% left?

I'm happy to do a PR to update the docs (provided I'm not wrong ๐Ÿ˜Š).

Documentation for LoadPixelData<TPixel>(TPixel[] data, int width, int height) is out of date

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of ImageSharp
  • I have verified if the problem exist in both DEBUG and RELEASE mode
  • I have searched open and closed issues to ensure it has not already been reported

Description

This code works correctly and gives me my normal map....

var heightMap = heightMapResult.Data;
Rgba32[] normals = heightMap.normals.Select(norm => new Rgba32(){
    R = (byte)(norm.X * 255), G = (byte)(norm.Y * 255), B = (byte)(norm.Z * 255), A = 255
}).ToArray();
                
using(var image = Image.LoadPixelData<Rgba32>(normals, heightMap.Width, heightMap.Height))
{
    await image.SaveAsPngAsync(_args.OutputFolder + "/normal-map.png");
}

But the getting started document forgets the width and height parameters.

Steps to Reproduce

Check here
https://docs.sixlabors.com/articles/imagesharp/pixelbuffers.html#loading-raw-pixel-data-into-an-imaget

System Configuration

.net core 2.1, windows 10

  • ImageSharp version:
  • Other ImageSharp packages and versions:
  • Environment (Operating system, version and so on):
  • .NET Framework version: 1.0.3
  • Additional information:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.