Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards: arm: unify Nucleo-64 boards connectors image #15926

Merged
merged 1 commit into from
May 8, 2019

Conversation

frantony
Copy link
Contributor

@frantony frantony commented May 6, 2019

At the moment there are two images for Nucleo-64 STM32 family board connectors, e.g.

  zephyr$ for i in $(sha1sum boards/arm/nucleo_*/doc/img/*_connectors.png | awk '{ print $1; }' | sort | uniq -d); do sha1sum boards/arm/nucleo_*/doc/img/* | grep $i; done
  2d0f82d251c8af489bf393524dc4fdf80e4d2382  boards/arm/nucleo_f070rb/doc/img/nucleo_f070rb_connectors.png
  2d0f82d251c8af489bf393524dc4fdf80e4d2382  boards/arm/nucleo_f091rc/doc/img/nucleo_f091rc_connectors.png
  2d0f82d251c8af489bf393524dc4fdf80e4d2382  boards/arm/nucleo_f103rb/doc/img/nucleo_f103rb_connectors.png
  2d0f82d251c8af489bf393524dc4fdf80e4d2382  boards/arm/nucleo_l053r8/doc/img/nucleo_l053r8_connectors.png
  2d0f82d251c8af489bf393524dc4fdf80e4d2382  boards/arm/nucleo_l073rz/doc/img/nucleo_l073rz_connectors.png
  366d7341f3eeb98e5cb44251425a123d7658d5e9  boards/arm/nucleo_f030r8/doc/img/nucleo_f030r8_connectors.png
  366d7341f3eeb98e5cb44251425a123d7658d5e9  boards/arm/nucleo_f302r8/doc/img/nucleo_f302r8_connectors.png
  366d7341f3eeb98e5cb44251425a123d7658d5e9  boards/arm/nucleo_f334r8/doc/img/nucleo_f334r8_connectors.png

The images have the same canvas size but different size in bytes and
different color coding:

  zephyr$ file boards/arm/nucleo_l073rz/doc/img/nucleo_l073rz_connectors.png boards/arm/nucleo_f030r8/doc/img/nucleo_f030r8_connectors.png
  boards/arm/nucleo_l073rz/doc/img/nucleo_l073rz_connectors.png: PNG image data, 800 x 619, 8-bit colormap, non-interlaced
  boards/arm/nucleo_f030r8/doc/img/nucleo_f030r8_connectors.png: PNG image data, 800 x 619, 8-bit/color RGBA, non-interlaced

  zephyr$ ls -1 -sh boards/arm/nucleo_l073rz/doc/img/nucleo_l073rz_connectors.png \
                    boards/arm/nucleo_f030r8/doc/img/nucleo_f030r8_connectors.png
  464K boards/arm/nucleo_f030r8/doc/img/nucleo_f030r8_connectors.png
  192K boards/arm/nucleo_l073rz/doc/img/nucleo_l073rz_connectors.png

Applying simultaneous black/white threshold to the images and comparing them with imagemagick tools shows that the images have no significant difference.

zephyr$ convert boards/arm/nucleo_l073rz/doc/img/nucleo_l073rz_connectors.png -threshold 80% /tmp/1.png
zephyr$ convert boards/arm/nucleo_f030r8/doc/img/nucleo_f030r8_connectors.png -threshold 80% /tmp/2.png
zephyr$ compare /tmp/1.png /tmp/2.png -compose src /tmp/diff.png

Final fix is:

cp boards/arm/nucleo_l073rz/doc/img/nucleo_l073rz_connectors.png \
   boards/arm/nucleo_f030r8/doc/img/nucleo_f030r8_connectors.png
cp boards/arm/nucleo_l073rz/doc/img/nucleo_l073rz_connectors.png \
   boards/arm/nucleo_f302r8/doc/img/nucleo_f302r8_connectors.png
cp boards/arm/nucleo_l073rz/doc/img/nucleo_l073rz_connectors.png \
   boards/arm/nucleo_f334r8/doc/img/nucleo_f334r8_connectors.png

@zephyrbot
Copy link
Collaborator

zephyrbot commented May 6, 2019

All checks are passing now.

Review history of this comment for details about previous failed status.
Note that some checks might have not completed yet.

Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change is ok, but please rework the (otherwise great) commit message.
Maybe you can remove the analyzis (which will not be lost, since it is here), and
keep an abstract.

At the moment there are two images for Nucleo-64 STM32 family board
connectors (img/nucleo_xxxxxx_connectors.png).

The images have the same canvas size (800x619) but different file
size in bytes and different color coding.

The first one (192K, 8-bit colormap) is used for

  * nucleo_f070rb
  * nucleo_f091rc
  * nucleo_f103rb
  * nucleo_l053r8
  * nucleo_l073rz

The second one (464K, 8-bit/color RGBA) is used for

  * nucleo_f030r8
  * nucleo_f302r8
  * nucleo_f334r8

Applying simultaneous black/white threshold to the images and
comparing them with imagemagick tools shows that the images
have no significant difference. Therefore we can use
nucleo_l073rz_connectors.png for nucleo_f030r8, nucleo_f302r8
and nucleo_f334r8.

Please see zephyrproject-rtos#15926
for details.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
@frantony
Copy link
Contributor Author

frantony commented May 7, 2019

@erwango

Please review updated commit message.

@nashif nashif merged commit dffd779 into zephyrproject-rtos:master May 8, 2019
@frantony frantony deleted the inify-nucleo-img branch May 8, 2019 05:40
frantony added a commit to frantony/zephyr that referenced this pull request Jan 6, 2020
At the moment we have different images for
for Nucleo F030R8 and Nucleo F070RB boards,
the images have the same pixel size but different
file formats, e.g:

  NAMES="f030r8 f070rb"
  for i in $NAMES; do
    file boards/arm/nucleo_$i/doc/img/nucleo_$i.jpg;
  done

  boards/arm/nucleo_f030r8/doc/img/nucleo_f030r8.jpg: JPEG image
  data, Exif standard: [TIFF image data, little-endian,
  direntries=0], baseline, precision 8, 500x367, frames 3
  boards/arm/nucleo_f070rb/doc/img/nucleo_f070rb.jpg: JPEG image
  data, JFIF standard 1.01, aspect ratio, density 1x1,
  segment length 16, progressive, precision 8, 500x367, frames 3

The nucleo_f030r8.jpg file is larger:

  for i in $NAMES; do
    ls -1 -sh boards/arm/nucleo_$i/doc/img/nucleo_$i.jpg;
  done

  128K boards/arm/nucleo_f030r8/doc/img/nucleo_f030r8.jpg
  40K boards/arm/nucleo_f070rb/doc/img/nucleo_f070rb.jpg

Applying simultaneous black/white threshold to the images
and comparing them with imagemagick tools shows that
the images have no significant difference.

  for i in $NAMES; do
    convert boards/arm/nucleo_$i/doc/img/nucleo_$i.jpg \
            -threshold 80% /tmp/$i.png;
  done
  compare $(for i in $NAMES; do echo -n  "/tmp/$i.png "; done) \
            -compose src /tmp/diff.png

See also 'boards: arm: unify Nucleo-64 boards connectors image'
(zephyrproject-rtos#15926).

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
MaureenHelm pushed a commit that referenced this pull request Jan 6, 2020
At the moment we have different images for
for Nucleo F030R8 and Nucleo F070RB boards,
the images have the same pixel size but different
file formats, e.g:

  NAMES="f030r8 f070rb"
  for i in $NAMES; do
    file boards/arm/nucleo_$i/doc/img/nucleo_$i.jpg;
  done

  boards/arm/nucleo_f030r8/doc/img/nucleo_f030r8.jpg: JPEG image
  data, Exif standard: [TIFF image data, little-endian,
  direntries=0], baseline, precision 8, 500x367, frames 3
  boards/arm/nucleo_f070rb/doc/img/nucleo_f070rb.jpg: JPEG image
  data, JFIF standard 1.01, aspect ratio, density 1x1,
  segment length 16, progressive, precision 8, 500x367, frames 3

The nucleo_f030r8.jpg file is larger:

  for i in $NAMES; do
    ls -1 -sh boards/arm/nucleo_$i/doc/img/nucleo_$i.jpg;
  done

  128K boards/arm/nucleo_f030r8/doc/img/nucleo_f030r8.jpg
  40K boards/arm/nucleo_f070rb/doc/img/nucleo_f070rb.jpg

Applying simultaneous black/white threshold to the images
and comparing them with imagemagick tools shows that
the images have no significant difference.

  for i in $NAMES; do
    convert boards/arm/nucleo_$i/doc/img/nucleo_$i.jpg \
            -threshold 80% /tmp/$i.png;
  done
  compare $(for i in $NAMES; do echo -n  "/tmp/$i.png "; done) \
            -compose src /tmp/diff.png

See also 'boards: arm: unify Nucleo-64 boards connectors image'
(#15926).

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants