Save an Image from .NET MAUI Community Toolkit DrawingView

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ม.ค. 2025

ความคิดเห็น •

  • @jfversluis
    @jfversluis  2 ปีที่แล้ว +2

    Want to explore ALL the features of the .NET MAUI Community Toolkit DrawingView? I've got that video, and a whole bunch of others in this playlist, right here: th-cam.com/video/7rw13_a5GR0/w-d-xo.html

  • @rezianaduzha3574
    @rezianaduzha3574 ปีที่แล้ว +4

    Hi Gerald!
    Thankyou for the video.
    But can you suggest how to save the image with transparent background?

  • @tanakamawere
    @tanakamawere 2 ปีที่แล้ว +2

    How Gerald posts the videos that are on my mind, I just don't know. AMAZING STUFF THIS.

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      I am also a part-time mind reader 🔮 glad it was helpful!

    • @swapnilgaikwad4673
      @swapnilgaikwad4673 2 ปีที่แล้ว

      Same

  • @abdrockman
    @abdrockman ปีที่แล้ว

    Hallo mr Gerald, could you please show me how to read this file which we save to the storage? thank you

  • @willianaugusto7923
    @willianaugusto7923 ปีที่แล้ว

    Thanks for this video. Your videos convey a lot of information so easily.

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      Glad you like them!

  • @TheChrisx123
    @TheChrisx123 8 หลายเดือนก่อน

    Hi, on 10:18 image is definitely not 1024x1024, in fact I have huge problem with this, i need this image to be exact size i want, but no matter what, output image is resizing to area with drawings, so are there any updates on this? I'll be grateful for response

    • @jfversluis
      @jfversluis  8 หลายเดือนก่อน +1

      Any issues with the actual library should be reported on the repository.

  • @ccgould434
    @ccgould434 ปีที่แล้ว

    How do I the path of the image form the android 29 version so I can use it to load the image from the gallery in the image view?

  • @mandardesai3841
    @mandardesai3841 7 หลายเดือนก่อน

    when i draw in landscape mode and see in portrait mode that the drawing image goes out of the screen how can I fix this problem any help will be appreciated. Thank you.

  • @PhangTingya
    @PhangTingya ปีที่แล้ว

    Is it possible to load a image background image for the drawing view?

  • @acceliidacceliis2872
    @acceliidacceliis2872 ปีที่แล้ว +1

    I like your videos, a new one about Image zoom/swipe (working on windows) would be nice

  • @manadochannel6025
    @manadochannel6025 ปีที่แล้ว

    could you give sample for resizing image after submit button

  • @tanakamawere
    @tanakamawere 2 ปีที่แล้ว

    Hie Gerald, this code is working on the android emulator but not on a physical devices. The following error is being thrown "system.IO.DirectoryNotFoundException: 'Could not find a part of the path '/storage/emulated/0/Pictures/Medbase-11/01/2023 19:12:40.png'.'" I am thinking it's to do with permissions but I might be wrong. Please help

  • @josedonizeteoliveirajunior1744
    @josedonizeteoliveirajunior1744 2 ปีที่แล้ว

    Thanks for showing how to do it. Very good!

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Glad it was helpful!

  • @pratham_dev
    @pratham_dev 2 ปีที่แล้ว

    Can we have a video on Google, Facebook & ios auth 2.0

  • @VladislavAntonyuk
    @VladislavAntonyuk 2 ปีที่แล้ว

    Thanks Gerald!
    Just interesting why the image is so small on 10:18 it does look like 1024x1024. Maybe you discovered the bug

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      Hm now that you mention it, it does look a bit small 😅 although I think the Windows resolution is scaled as well, so it might as well be 1024x1024 although it doesn't look like that?

    • @VladislavAntonyuk
      @VladislavAntonyuk 2 ปีที่แล้ว

      @@jfversluis I will check. Width and height parameters doesn’t make sense if the image size is the same as canvas’s size

  • @Wolfgang-vn7we
    @Wolfgang-vn7we ปีที่แล้ว

    Hi, this is a very good video but i have some other question. How can i erase a line with a function like "rubber"?

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      I don’t think you can right now. Unless you implement it yourself of course

  • @rudirudi-xj8dd
    @rudirudi-xj8dd ปีที่แล้ว

    media picker maui is compatible with camera.maui control? beacuse i try to take a picture from media picker and saving , but i can not make from camera maui control , how i can do it? thanks

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      Hm I’m not really sure if I understand. MediaPicker allows you to pick photos from the device gallery or take a picture with the device camera app. Camera.MAUI is a control that you can use inside of your app to show a live preview of the camera and take pictures. They don’t really work together.

  • @MRLacey
    @MRLacey 2 ปีที่แล้ว

    It’d be nice to see at least a version of this in the toolkit. I get that there are lots of potential things that can be done with an image but it’d be nice to have a built in way to save to disk if I provide a name and location

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      Not sure I understand. This is done with the DrawingView that is in the Toolkit right now. But what you mean is that we make it easier basically?
      A name and location unfortunately doesn’t work great for all platforms, I guess that is why we implemented it like this so that you can access all the data and you as the developer can figure out what you want to do with it.

    • @MRLacey
      @MRLacey 2 ปีที่แล้ว +1

      @@jfversluis It's the saving to file code that I think would be beneficial in the toolkit. What you add in this video is the way to take the image from the control and save it to disk. As you say (for Android at least) it's a lot of code and it would be great if every app didn't need to repeat this in *almost* the same way.

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      Definitely true! If you have some ideas around that feel free to open an issue to discuss and see how we can make it better! Thanks for the insights!

  • @LinaAbdalla-z8p
    @LinaAbdalla-z8p ปีที่แล้ว

    Great video Gerald! when I attempt to save the image two times, it doesn't work, it only works once. Any idea why that might be?

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      Not without any details!

    • @LinaAbdalla-z8p
      @LinaAbdalla-z8p ปีที่แล้ว

      @@jfversluis The error states "The process cannot access the file 'Test.png' because it is being used by another process."

    • @LinaAbdalla-z8p
      @LinaAbdalla-z8p ปีที่แล้ว

      Figured out what the problem is. The WriteAllBytesAsync line was reading in local path from another file which includes the file name, so when I click save image the second time, it tries to use the same name which results in using the same process. So now I'm changing the name dynamically in the same file so it creates a new image file everytime.

  • @byroncoetzee3173
    @byroncoetzee3173 8 หลายเดือนก่อน

    great stuff thanks!!

  • @aathifmahir
    @aathifmahir 2 ปีที่แล้ว

    Here we are 😊

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Have you been waiting for it? :D

    • @aathifmahir
      @aathifmahir 2 ปีที่แล้ว

      @@jfversluis Most Probably Yes

  • @misterbeastthebestyouruberinth
    @misterbeastthebestyouruberinth ปีที่แล้ว

    how to save the entire page as pdf

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      You’ll need a PDF generation library

    • @misterbeastthebestyouruberinth
      @misterbeastthebestyouruberinth ปีที่แล้ว

      @@jfversluis can i save it as Html ???

    • @misterbeastthebestyouruberinth
      @misterbeastthebestyouruberinth ปีที่แล้ว

      @@jfversluis i am building an quotes generator it takes user inputs then return a quote page with photos and text, like prices, ... how can i save this page to the local device?

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      Use a library to generate the PDF and then the FileSaver in .NET MAUI Community Toolkit to save it
      th-cam.com/video/Q9T-dRYq3Ps/w-d-xo.html

    • @misterbeastthebestyouruberinth
      @misterbeastthebestyouruberinth ปีที่แล้ว

      @@jfversluis thank you , do you recommend any library?? any free ones???

  • @funnybaldandbeardy3927
    @funnybaldandbeardy3927 2 ปีที่แล้ว

    Is there a way to get an image from the maui GraphicsView or, paint directly to an image in maui?
    The community toolkit DrawingView is to simple for my needs?
    GraphicsView handles the drawing well although not quite fast enough so I need to cache images between invalidates. I've tried graphicsView.CaptureAsync() but it doesn't handle the transparency.
    I'd really like to offload as much drawing stuff as I can to a background thread any hint's / tips would be greatly appreciated, e.g. to access the graphics view underling image on Windows / MAC you would...