lossless

Lossless Join and Decomposition From Functional Dependencies

倾然丶 夕夏残阳落幕 提交于 2019-12-31 10:49:27
问题 Suppose the relation R( K, L, M, N, P) , and the functional dependencies that hold on R are: - L -> P - MP -> K - KM -> P - LM -> N Suppose we decompose it into 3 relations as follows: - R1(K, L, M) - R2(L, M, N) - R3(K, M, P) How can we tell whether this decomposition is lossless? I used this example R1 ∩ R2 = {L, M}, R2 ∩ R3 = {M}, R1 ∩ R3 = {K,M} we use functional dependencies, and this is not lossless in my opinion, but a little bit confused. 回答1: It helps if we demystify the concept of

How to make jpeg lossless in java?

喜你入骨 提交于 2019-12-08 20:21:05
问题 Is there someone that can tell me how to write 'jpeg' file using lossless compression in java? I read the bytes using the code below to edit the bytes WritableRaster raster = image.getRaster(); DataBufferByte buffer = (DataBufferByte) raster.getDataBuffer(); And I need to write again the bytes as 'jpeg' file without compressing in lossy . 回答1: The JAI package offers the ability to save “lossless JPEG” formats. Set compresion type to JPEG-LS or JPEG-LOSSLESS depending on what variant you want.

Lossless jpeg batch crop

好久不见. 提交于 2019-12-08 04:18:41
问题 I need to crop a bunch of jpegs by 20 pixels on the right side losslessly. Do you know about any software that can do that? I checked jpegtran but it needs the file size in pixels before cropping and I don't know how to build a batch file with that. Any ideas? 回答1: My shell scripting is a little rusty so please make a backup of your images before trying this script. #!/bin/bash FILES=/path/to/*.jpg for f in $FILES do identify $f | awk '{ split($3, f, "x"); f[1] -= 20; cl = sprintf("jpegtran

How do I seamlessly concatenate MP3 streams?

元气小坏坏 提交于 2019-12-04 08:44:04
问题 I'm working on a streaming server that will be capable of broadcasting targetted ads. Basically listeners hear the same music, but every, say, 30 minutes comes a block of ads and every listener has his/her own block. Implementing such streaming server poses various problems and this question is about one of them. The server will work in a manner similar to Icecast, i.e. it will read the stream over the network from some stream generator and relay it to every listener. When it's time to

Lossless Join and Decomposition From Functional Dependencies

放肆的年华 提交于 2019-12-02 21:16:57
Suppose the relation R( K, L, M, N, P) , and the functional dependencies that hold on R are: - L -> P - MP -> K - KM -> P - LM -> N Suppose we decompose it into 3 relations as follows: - R1(K, L, M) - R2(L, M, N) - R3(K, M, P) How can we tell whether this decomposition is lossless? I used this example R1 ∩ R2 = {L, M}, R2 ∩ R3 = {M}, R1 ∩ R3 = {K,M} we use functional dependencies, and this is not lossless in my opinion, but a little bit confused. It helps if we demystify the concept of lossless decomposition a bit: it really just means that joining R1, R2 and R3 should yield the original R. Do

Lossless JPEG Rotate (90/180/270 degrees) in Java?

痞子三分冷 提交于 2019-11-27 03:46:42
Is there a Java library for rotating JPEG files in increments of 90 degrees, without incurring image degradation? I found this: http://mediachest.sourceforge.net/mediautil/ API: http://mediachest.sourceforge.net/mediautil/javadocs/mediautil/image/jpeg/LLJTran.html Building on Henry's answer, here's an example of how to use MediaUtil to perform lossless JPEG rotation based on the EXIF data: try { // Read image EXIF data LLJTran llj = new LLJTran(imageFile); llj.read(LLJTran.READ_INFO, true); AbstractImageInfo<?> imageInfo = llj.getImageInfo(); if (!(imageInfo instanceof Exif)) throw new

Lossless JPEG Rotate (90/180/270 degrees) in Java?

眉间皱痕 提交于 2019-11-26 10:52:20
问题 Is there a Java library for rotating JPEG files in increments of 90 degrees, without incurring image degradation? 回答1: I found this: http://mediachest.sourceforge.net/mediautil/ API: http://mediachest.sourceforge.net/mediautil/javadocs/mediautil/image/jpeg/LLJTran.html 回答2: Building on Henry's answer, here's an example of how to use MediaUtil to perform lossless JPEG rotation based on the EXIF data: try { // Read image EXIF data LLJTran llj = new LLJTran(imageFile); llj.read(LLJTran.READ_INFO