Giter VIP home page Giter VIP logo

Comments (7)

yurtemre7 avatar yurtemre7 commented on August 15, 2024 3

Yeah I dont know, hope my PR #69 goes through then we will have a nice updated package and the new toPngBytes method

from signature.

yurtemre7 avatar yurtemre7 commented on August 15, 2024 2

No you are not doing something wrong, its the toPngBytes method which sets fixed height and width values.
Current workaround would be something like this:

ui.Image? img = await _controller?.toImage(
  height: _controller?.defaultHeight ?? 0,
  width: _controller?.defaultWidth ?? 0
);

ByteData? byteData = await img?.toByteData(
  format: ui.ImageByteFormat.png
);

// Image data
var data = byteData?.buffer.asUint8List();

Where ui.Image is from import 'dart:ui' as ui;

from signature.

KirioXX avatar KirioXX commented on August 15, 2024

Awesome! Thanks, @yurtemre7.
That seems to do the trick, what is odd though is that it sometimes worked without any issues.

from signature.

DmitrySikorsky avatar DmitrySikorsky commented on August 15, 2024

For now you can just use version 5.0.1. It doesn't contain this bug.

from signature.

echb avatar echb commented on August 15, 2024
    //WIDTH AND HEIGHT IS OPTIONAL. IMAGE WILL BE CENTERED
    final ui.Image? image = await toImage(height: 500, width: 400);  // --> Here is the issue

Height and width by default are set, so, when u set a higher value on the widget it breaks
@yurtemre7 PR #69 might fix the issue, @DmitrySikorsky .

from signature.

MartinHlavna avatar MartinHlavna commented on August 15, 2024

Hi

sorry for late response, we did not have available maintenance window for a while. I am looking at PR #69 right now

from signature.

MartinHlavna avatar MartinHlavna commented on August 15, 2024

Fixed in 5.3.0

from signature.

Related Issues (20)

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.