Re: /Filters/Render/Stroke to SVG...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Paul,
On Fri, Sep 26, 2008 at 2:19 AM, paul taney <paultaney@xxxxxxxxx> wrote:>>>>>> When it doesn't register, is there any console output>> from GIMP?>>>> Chris>>> I"ve got things working now and use numpy to convert bluelines to SVG lines or a python tuple that gets written out.>> It could be of general interest for vectorizing if it treated a selection.>> But I am converting scanned stripcharts, and the ink is blue...  One y per x is all I need, and there would be a slick way to do that with numpy; I"m just using a stride for line thinning.>>> The part I dont understand is this; I pass my bluemask to (Fremlin"s) write_out(drawable, image) as the image, it fails the assertion and does not post...>>    numpy.array((image*256).round(0),"B")
Which assertion fails?
>>> def write_out(drawable, image):>    """by John Fremlin""">    byte_image = numpy.array((image*256).round(0),"B")  # B is a ubyte>    width = drawable.width>    height = drawable.height>    bpp = drawable.bpp>    sys.stderr.write("write_out::drawable.width=%i drawable.height=%i drawable.bpp=%i\n" % (width, height, bpp))>>    pr = drawable.get_pixel_rgn(0, 0, width, height, True)>    assert(byte_image.size == width * height * bpp)>    pr[:,:] = byte_image.tostring()
You are passing an RGB array to this function. Are you certain thatyour destination drawable does not have an alpha channel (thusrequiring you to pass an RGBA array)?


David
-- Everything has reasons. Nothing has justification.Ĉio havas kialojn; Neniaĵo havas pravigeron._______________________________________________Gimp-developer mailing listGimp-developer@xxxxxxxxxxxxxxxxxxxxxxxxxxx://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux