From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29863 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Images in Jupyter Notebook to Markdown conversion Date: Wed, 29 Dec 2021 11:27:55 -0800 Message-ID: References: <6d84aa5d-bdc8-4612-b471-c7b270f3936an@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30266"; mail-complaints-to="usenet@ciao.gmane.io" To: =?utf-8?Q?S=C3=A9bastien_Boisg=C3=A9rault?= , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBZXNWKHAMGQEE4ZJ2JI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Dec 29 20:28:41 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pj1-f62.google.com ([209.85.216.62]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n2ecr-0007fH-4X for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 29 Dec 2021 20:28:41 +0100 Original-Received: by mail-pj1-f62.google.com with SMTP id p4-20020a17090a348400b001b103a13f69sf18151681pjb.8 for ; Wed, 29 Dec 2021 11:28:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1640806120; cv=pass; d=google.com; s=arc-20160816; b=xAqCsMr7zCvv2+emHnvBhyVWYQdHuZAWXZ6LukcNT79c1w/NId1yEXg3cUGHvke0PT P3U27WGttGbtM4qOCfh1WyhYdHTtM13M6tBtQzUbHbblON0zhsrtRjs1CFWB1SNop3rJ ud6pXCZZaow4wV4Qdi4onbbmwVR3xGRWhzUvP0ZhhsHSrBApajJppPY8tJUEXyuvixOe zrCj6YbZ/C/jXFX78Zb4STE5xhbmNRCrRjcvfXGvvxzg52qT7+WO29rXSxbhtfmntRBA ldjJGKlokJlRNf4igWtjK2tArST7LKIsnu7pg4W1ZqQ/l3vsDI02+6Hrdb65WOHWiPlZ AySw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :mime-version:message-id:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=M1fn+v4yosp7JtdbdcFmMX6WK0vKEs244M0MKEYPQ2I=; b=IiYClt2oSgSv5Sgy5ObFsV/Q+WGIkIg0TUfC4zXuRVZwHLV3cd9rg8ecajbTLmBPwF TsFuWFa1OE+CRQthXzZgELuBWs5rO/HpXMoRjHcbgLadV69QyWIwT+r6nXBkvQzHYriO EV2a+uG5AQAbn0o+zMgqwNcsITu1u/Zidnc7bORblUkInkuCLhFGx58mlcLyAuNy9Tsj 1ia99X7msBeducmRQdz8EbfOMgAIfD8w3lYM3SQ/IAEroNPx0Tnd2MPcYs79lrqi0bbT wVs/M5HZITMzc4PAmzGh2YAManSIONeWhOLfRTLC1HKDcOnoQhLmfuX9S4h1chTeK+8E Apwg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=IfJ4qZUg; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::52e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=M1fn+v4yosp7JtdbdcFmMX6WK0vKEs244M0MKEYPQ2I=; b=kUkoBk0bAJob4syqlyVacU4DP2me2jv4uAVYIXvNYjhvXg1Qh4wPDHf1doQBXGYFAj 2qD2uGV1m99tfLwpUapfW0mzVq+Rr7LXvo48fAi4Pa/kbvLAG8GPY57BH1fP7eUwUQwj 5zi8h1VBmnGzpi2k8JkPl5tK3HJtVaE/bi+qoomhPVbrmK5Ik2XM/ER7D4hW8DXjuDB1 y7M4hgqrYKJn8VvYvi3e2Kv6C124vgWbC5WeO4FrpqK3DUzBrspFhCZheYq22G1DunsS GmdSLEVlb2k0WVLjHxxbvIhdfHWestl4V+8ham91hyI0GtREGHymk5Ko9nXieFYyxWK9 zYew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:content-transfer-encoding :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=M1fn+v4yosp7JtdbdcFmMX6WK0vKEs244M0MKEYPQ2I=; b=7Mxp4dHGTQVNr2FAOK4g2O041B2fGV3Gia+w6qi+zcTqRUyBxmzWAQxSsPs333E37H pnZuGqjCjqZL06/zVZAcFLn1+Y8Ig4VESB0Jp4yX3FQ5IgLIam/fXI+oO1DjwAu5EnLF 6wogT2kCxAhvlE3/FX+0mpK3fjFEAZqHg4XYnlGHmOS6RD35LHPFeTTOLyUMxDfSVJU8 PmhfC69VsZX3mYaB27WE9rXTlFbyIKH0DDVpVCb8xsRlMWqW/6xU9YYJGXaYgz6Wu1oX RxgxowdmnBlW81L1DM3478lRZ1e9bYqgUZ9rHwBqrilcgnmVP3v+gynDv5VUKxOniYPy Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532GRzO0lLQvezy8QEHjq+A5isZPt0SvEcjTunjHu/5sEdtysZfP EK6YQzbSpw3ZG4RTT0BG84M= X-Google-Smtp-Source: ABdhPJy8SyWe9tdChhVyP9S732YkIKja+U6nixhXwzZNifKnvhDvDk2gweivkw5Nr17r6X+qQcdncw== X-Received: by 2002:a17:902:9b90:b0:149:931b:44db with SMTP id y16-20020a1709029b9000b00149931b44dbmr8375795plp.117.1640806119865; Wed, 29 Dec 2021 11:28:39 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a63:78ce:: with SMTP id t197ls2870413pgc.1.gmail; Wed, 29 Dec 2021 11:28:37 -0800 (PST) X-Received: by 2002:a05:6a00:24cd:b0:4ba:c950:d696 with SMTP id d13-20020a056a0024cd00b004bac950d696mr28337907pfv.74.1640806117808; Wed, 29 Dec 2021 11:28:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640806117; cv=none; d=google.com; s=arc-20160816; b=TpjrGL+MVXGJoJptCSoECwuv+cKXWHSlAM27Uklnw7fG7TwD5yURO3SfKK2Ay5vkti ut1yjx2MGJ2xkGqdiSKyI5DJ0yj2YuDSAGySXRrKwAB63d1b1B6pyj0ATXCzXocXovsx FqBN5pQPNQg9FmMqKuzgG7MerLSrjumXHaak/DnCafffNNweyhQL/ZxfrY2HaTs9boNh 2G48pSAf1bmdCKsuQdqFi0Mc91yC+25Eerjp/CCm+lYkEJNznp8TFqfU7XHB4H844mUB KhQl7E4uC175GAEIYl8G/zx8HJ+F/FVqKS7OrCxTwuRafNeQHR58wJIFqKlsrHn6K0K0 oOKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:dkim-signature; bh=uFgI0b4IAFJro2mKxj1Po8PiWTfmQh/XzKfmCdE3eFI=; b=fqXkXmDtwrSNSiN079jHqgwsaCczZaWa+E6L7FKH9MLaOhqF9dkkg2IkfcRBhRgeCi cj5VUuN+tVjiEdp9fnT5+Rn+LHC0iub9dPE305HGkny2k6tM/dfpuAxJrE04SkqfGpOm TQreshj+0WxLjeGtTZuF3gaBFLOYfY16vgy8+7BYamVq2qiaoTOBCewsrfI4P/uJflwo L+uReXntfFI9M+sfo0eryzxYb2oNWTXUMayg8yZOX4oSQ4TNzMNd2Isi+1MY4R/VFqOM 1+J9ORCYLrETBuQdj4pH654wN8em0eQgW8uomWYier/iggnGPsFX7VQJT7er2R/O42V1 BXtQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=IfJ4qZUg; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::52e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com. [2607:f8b0:4864:20::52e]) by gmr-mx.google.com with ESMTPS id j5si982581plj.13.2021.12.29.11.28.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Dec 2021 11:28:37 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::52e as permitted sender) client-ip=2607:f8b0:4864:20::52e; Original-Received: by mail-pg1-x52e.google.com with SMTP id g22so19302593pgn.1 for ; Wed, 29 Dec 2021 11:28:37 -0800 (PST) X-Received: by 2002:a63:703:: with SMTP id 3mr24687192pgh.128.1640806116954; Wed, 29 Dec 2021 11:28:36 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id 204sm6993558pfy.207.2021.12.29.11.28.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Dec 2021 11:28:36 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 81D49A29D; Wed, 29 Dec 2021 14:27:55 -0500 (EST) In-Reply-To: <6d84aa5d-bdc8-4612-b471-c7b270f3936an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=IfJ4qZUg; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::52e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:29863 Archived-At: See the --extract-media option in the manual. S=C3=A9bastien Boisg=C3=A9rault writes: > Hello everyone, > > When i convert the images.ipynb notebook to markdown, the resuting docume= nt=20 > contains > > ::: {.output .execute_result execution_count=3D"4"} > ![](fcbe61351f965c3664d65d5e93991915402e0483.png) > ::: > > but AFAICT, the png file is not generated. Using the standalone option do= es=20 > not change anything. And of course, the round-tripping (md -> ipynb) fail= s=20 > with: > > File fcbe61351f965c3664d65d5e93991915402e0483.png not found in resource p= ath > > The original notebook can be visualized here:=20 > https://github.com/boisgera/python-advanced-eval/blob/master/samples/imag= es.ipynb.=20 > The (Grace Hopper) image it contains is an image/png cell output=20 > (Matplotlib is used to display the image) : > > { > "cell_type": "code", > "execution_count": 4, > "metadata": {}, > "outputs": [ > { > "data": { > "image/png":=20 > "iVBORw0KGgoAAAANSUhEUgAAAgAAAAJYCAIAAACbx8k3AAEAAElEQVR4nGT92dMsWZIfhrn7= 2SIil2+/S9Xtqq7qbboxPSswwGAAGQwkRYEyQgYZARIvMiNIo0wveseDTGaCXkTqX+CLKJO4CRI= IgaSGAIfAAAPMYLqnZ+nprurat7t+Wy4RcTZ3PXhGVPYgH67lzS8z4sRZfPn5z93x6tG/7X3jXU= A0tWApAgAGbd/vlst=20 > ... > > I am using pandoc 2.16.2 (Linux). Is it considered a bug or am I missing= =20 > something? Shall I file an issue?=20 > > Regards, > > S=C3=A9bastien > > > --=20 > You received this message because you are subscribed to the Google Groups= "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/6d84aa5d-bdc8-4612-b471-c7b270f3936an%40googlegroups.com. > --- > jupyter: > nbformat: 4 > nbformat_minor: 2 > --- > > ::: {.cell .code execution_count=3D"1"} > ``` python > import matplotlib.pyplot as plt > from matplotlib.cbook import get_sample_data > ``` > ::: > > ::: {.cell .code execution_count=3D"2"} > ``` python > with get_sample_data("grace_hopper.jpg") as file: > image_array =3D plt.imread(file) > ``` > ::: > > ::: {.cell .code execution_count=3D"3"} > ``` python > image_array > ``` > > ::: {.output .execute_result execution_count=3D"3"} > array([[[ 21, 24, 77], > [ 27, 30, 85], > [ 33, 35, 92], > ..., > [ 76, 114, 189], > [ 71, 109, 184], > [ 76, 114, 189]], > > [[ 26, 29, 82], > [ 25, 28, 83], > [ 27, 29, 86], > ..., > [ 60, 98, 173], > [ 56, 94, 169], > [ 62, 100, 175]], > > [[ 21, 24, 77], > [ 20, 23, 78], > [ 20, 22, 79], > ..., > [ 79, 117, 190], > [ 80, 118, 191], > [ 88, 126, 199]], > > ..., > > [[153, 13, 24], > [163, 18, 31], > [164, 18, 29], > ..., > [ 14, 13, 19], > [ 13, 12, 18], > [ 11, 10, 16]], > > [[149, 12, 22], > [156, 14, 26], > [160, 16, 26], > ..., > [ 13, 12, 18], > [ 13, 12, 18], > [ 12, 11, 17]], > > [[150, 12, 25], > [154, 14, 25], > [157, 16, 25], > ..., > [ 14, 13, 19], > [ 14, 13, 19], > [ 14, 13, 19]]], dtype=3Duint8) > ::: > ::: > > ::: {.cell .code execution_count=3D"4"} > ``` python > plt.imshow(image_array) > plt.show() > ``` > > ::: {.output .execute_result execution_count=3D"4"} > ![](fcbe61351f965c3664d65d5e93991915402e0483.png) > ::: > ::: --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/m2ilv7yzwk.fsf%40MacBook-Pro-2.hsd1.ca.comcast.net.