Closed chengdonglin closed 1 year ago
Hello @chengdonglin,
Q=85
. At Q 90, libvips will encode without chroma subsampling, which needs a lot more space.thanks! @jcupitt ,
- Try
Q=85
. At Q 90, libvips will encode without chroma subsampling, which needs a lot more space.- I think you need to put some XML in IMAGEDESCRIPTION with the OME-TIFF pixel info. See: https://forum.image.sc/t/writing-qupath-bio-formats-compatible-pyramidal-image-with-libvips/51223/14?u=jcupitt
Ah OK. I would guess qupath is still looking for some XML in IMAGEDESCRIPTiON.
You could also try setting the TIFF DPI, eg.;
im.write_to_file("ljh.tiff", compression="jpeg", Q=90, tile=True, pyramid=True, xres=100, yres=100)
Where the units are pixels per millimetre.
@jcupitt I publish the code on my server, cpu is 4, memory 32G, But I find it is slowly generate tiff and dzi files compare the win,It normal?
It should be maybe 20% faster than win, depending on various factors.
Perhaps your server does not have libjpeg-turbo installed?
libjpeg-turbo
yes,I not install libjpeg-turbo, I use the Docker to build the serve。
It should be maybe 20% faster than win, depending on various factors.
Perhaps your server does not have libjpeg-turbo installed?
@jcupitt , have you install it by Dockerfile, I have find there is no name libjpeg-turbo by apt-get, then I install it by apt-get libturbojpeg-dev, it slowly too, next my part dockerfile:
FROM python:3.9.7-slim
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
RUN apt update \
&& apt install -y libmariadb-dev \
gcc\
python3-dev \
libcogl-pango-dev \
libcairo2-dev \
libtool \
linux-headers-amd64 \
musl-dev \
libffi-dev \
libssl-dev \
libjpeg-dev \
zlib1g-dev \
libcurl4
It means success install libjpeg-turbo?
Yes, that looks OK.
There are some sample dockerfiles here:
Yes, that looks OK.
There are some sample dockerfiles here:
after install libturbojpeg-dev, regenerate the tiff and dzi, It cost 297978ms and 663214ms,I will use https://github.com/jcupitt/docker-builds/blob/master/pyvips-python3.7-alpine/Dockerfile to rebuild and retry generate
I using next code to generate tiff file, the tiles total size is 90M, width = 69632, height = 32768, finally tiff file size is 1.3G,