Comments (9)
using (Tiff input = Tiff.Open(@"D:\1.tif", "a"))
{
input.SetDirectory(0);
input.SetField(TiffTag.ORIENTATION, BitMiracle.LibTiff.Classic.Orientation.BOTLEFT);
input.RewriteDirectory();
}
Work!!!
but I need use
using (Tiff input = Tiff.ClientOpen("in-memory", "a", stream, new TiffStream()))
it does not work
from libtiff.net.
Please clarify what does "no working !!!" means.
from libtiff.net.
var stream = new MemoryStream(File.ReadAllBytes(@"D:\1.tif"));
using (Tiff input = Tiff.ClientOpen("in-memory", "a", stream, new TiffStream()))
{
input.SetDirectory(0);
var result=input.SetField(TiffTag.ORIENTATION, BitMiracle.LibTiff.Classic.Orientation.RIGHTBOT);
input.RewriteDirectory();
}
In this case the field ORIENTATION no save correctly
Open the tiff with irfanView, the image no show rotated
But use
using (Tiff input = Tiff.Open(@"D:\1.tif", "a"))
{
input.SetDirectory(0);
input.SetField(TiffTag.ORIENTATION, BitMiracle.LibTiff.Classic.Orientation.BOTLEFT);
input.RewriteDirectory();
}
works correctly !!!
I need to use the variant Tiff input = Tiff.ClientOpen("in-memory", "a", stream, new TiffStream())
because I have the memory tiff
from libtiff.net.
Please note that you use different values for TiffTag.ORIENTATION in the first and the second cases.
Please also note that the first code block affects memory stream only and you should save the memory stream into a file.
from libtiff.net.
Please also note that you create non-expandable memory stream.
from libtiff.net.
what I want is to change the orientation field of a tiff because rotate the image. I have the tiff loaded into memory, then when I finish the album except pa verify
from libtiff.net.
Help me ?
from libtiff.net.
`using (Tiff input = Tiff.Open(@"D:\TRIAL DESIGNS\ROTARY\01.tif", "a"))
{
input.SetDirectory(0);
int width = input.GetField(TiffTag.IMAGEWIDTH)[0].ToInt();
int height = input.GetField(TiffTag.IMAGELENGTH)[0].ToInt();
input.SetField(TiffTag.ORIENTATION, BitMiracle.LibTiff.Classic.Orientation.BOTLEFT);
input.SetField(TiffTag.EXIF_PIXELXDIMENSION,height);
input.SetField(TiffTag.EXIF_PIXELYDIMENSION,width);
input.RewriteDirectory();
input.Close();
}`
I am Using this Code to rotate Image. Operation Successful & also visible in Irfan View. But when I load it in CYOTEK picture box Or Default picture box it doesn't reflects the rotation of Image.
from libtiff.net.
from libtiff.net.
Related Issues (20)
- "the parameter is incorrect" windows api error HOT 3
- Update the license file, so it integrates with GitHub nicely HOT 2
- EXIF_EXPOSURETIME not working
- Unable to read CMYK 96-bit image
- ComputeTile returns invalid number of tile HOT 1
- Get an error writing Linear DNG (need help) HOT 1
- In there an option to work without impacting on CMYK colors
- Adobe deflate HOT 9
- Having problems injecting TimeStamp into TiffTag.IMAGEDESCRIPTION HOT 1
- GeoTiff Support ? HOT 1
- Does not build on Mac HOT 3
- Hardcoded encoding HOT 3
- how to use libtiff.net to generate a tiff or svs support by openslide HOT 3
- Possible to write to a stream? HOT 1
- Skewed Landscape Images HOT 2
- How to use ReadRGBAImageOriented with Exif Orientation? HOT 1
- Will LibTiff support 32 bit samples RGBA Image? HOT 1
- Create a Svs file (Aperio format) by libtiff.net
- how to write label or marco to tif by libtiff.net
- writeTile
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libtiff.net.